Backport of gh-36767
Backport of gh-36767