[hibernate-issues] [JIRA] (HHH-16397) Wrong SQL when HQL has subquery using FK attribute of parent query root