Fixes issue #1

We weren't copying function parameters before we started mucking
around with them.