Fix for GRAILS-10252

http://jira.grails.org/browse/GRAILS-10252