Partially reverts #3641

Fixes #4526