Fix GRAILS-10178

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