Backport of gh-36805
Backport of gh-36805