Backport of GH-1223 to eight