Backport of gh-36367
Backport of gh-36367