Revert half-done refactoring committed in r52143