Fix and test for GRAILS-10637