GRAILS-10397 - improve how null is bound to persistent references