Fixes for GRAILS-10977 (against 2.3.x)