Fix cases where goto skips initialization of variables
Merge pull request #1703 from yebblies/gotoskipinit

Fix cases where goto skips initialization of variables