HHH-9305 : HQL FromElement is not reused in some cases resulting in an additional join