This looks fine, okay to merge. While backporting it, you might want to see whether any of the unit tests from 46267 should be backported as well.