Forgot to backport the rest of #1637.
2 files changed