Fix for GRAILS-11072

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