fix for GRAILS-10664 "Problem when using inheritance with grails 2.3.1"