Partially revert e09d2c6; improve tests around it