GRAILS-9739 flush the session at the end of withNewSession unless it's been set to manual