fix for GRAILS-11258 "Where chaining does not work"