Backport of gh-26574
Backport of gh-26574