Fix compile breakage from backporting #7920