Fix silly variable-shadowing error in remove_partial_stack

Closes #790, obsoletes #840.

Now how do we turn on the relevant GCC error so that we don't get this sort of thing again?
Merge pull request #866 from ethankaminski/partial-stacks-fix

Fix silly variable-shadowing error in remove_partial_stack