Committed fix to function inside closure - this.wrapIn....

This is to fix an issue after upgrading to Grails 2.3.1

See http://jira.grails.org/browse/GRAILS-10651