fix for GRAILS-10022 "NPE in persistence layer during unit test"