Backport of gh-36507
Backport of gh-36507