Backport of #11280
Backport of #11280