Revert part of r50883, superseded by Tim's r51453