CriteriaQueryTranslator#hasRestriction(String) only checks whether subcriteria has any restrictions, but it should also check for restrictions added to root criteria via an alias.