Fix variable aliasing warnings

MSVC 14 has new variable shadowing warnings, which are on by default and spam the Boost regression test output:
"warning C4456: declaration of '...' hides previous local declaration".
This renames a few variables to make MSVC happy.