GRAILS-10505 - GORM in-memory implementation behaves differently from hi...

...bernate implementation when using criteria with empty junctions

This fix makes CriteriaBuilder ignore empty junctions