Revert part of 5a6792755212777fea2e02aec42f16849f1bf7a2 [#4003].