Copy the arguments instead of using them directly.

Otherwise we can end up with data being changed out from under us.

(Thanks chansen!)