Backport of gh-36609
Backport of gh-36609