Stupid copy-paste to make the code work at all without optimisation.