Fix overagressive changing of variables

Partial revert of 6644ca39195ba6dbcd32e4666c7854049dcc2176