This reverts commit 2390eb6826. I've already marked other issues like this as 'invalid', so do this here, too. Although I don't like the code, there's not much use in fixing this in one place only.
2390eb6826