refs #801 Fix optimized build (did not get rid of enough variables
during cleanup)