Fix extra case where goto skips initialization of variables

(cherry picked from commit ac97a487917498632e3cd862db00348b7628b6b6)