Shadowing warning fix
Fixed this error https://open.cdash.org/viewBuildError.php?type=1&buildid=3812953
Note that I have made a change for what I believe should be correct. The warning was reported in an older version of Mac OS X which used older versions of GCC. In the latest Mac OS C, we have Clang instead of GCC and I was unsuccessful in being able to recreate the build system required for that warning. Hence have not been able to test this code.
This is a warning fix to the master branch of the current code, not the release version.