Fix cases where goto skips variable initialization found by fixing issue 602