Backport of gh-27784
Backport of gh-27784