Yes the problem is in CriteriaLoader#applyLocks. Instead of checking that there are no aliases, it should instead check that: