Fixing a bug with minimising variable declarations in quick mode.