fix for GRAILS-9586 "createCriteria()... list(max:max) and DetachedCriteria... list(max:max) are inconsistant"