Revert commit eb1f002e81723ea66c37f2e0e1438f91f1afa6cc.

This re-introduces an older problem, but fixes bug #20861.