Partial revert of 9f1108e52e4787610a488868d774992e1ca28979.