fix for GRAILS-10232 "GORM CountBy does not work anymore with sorted mapping"