Partially restored 3823420b6, in a way that should not break testing.