GRAILS-10320 - improve binding ids to persistent references