GRAILS-11480 fix performance regression caused by SPR-10307 changes