MSVC: vars must be declared at the start of a block