Fix clobbering of locals during setup

Fixes issue #89 completing the work that was started in pull-request #72.