Ah.. so this is about declaring the subquery in the HQL itself. I got confused with the comment about using a formula.
I'd tend to classify this as an enhancement, but JPA does seem to allow for this syntax so I'll leave it as a bug.