Because the problem is theme specific, I guessed that perhaps something in functions.php
could be the culprit. I renamed the file to some random string and this resolved the problem.
I then experimented by commenting out sections of functions.php
and discovered that wp_reset_password(...)
caused the problem. I needed it only once anyway, so I removed it and I’m now living happily ever after.