Fix cases where goto skips initialization of variables