Backport of #9221.