Make changes to a copy of the options parameter

If the method alters the options hash, clients calling this method in a loop
will unwittingly be sending a different hash on the second and subsequent calls.
Give 'versionId' value the expected structure
Merge pull request #2454 from joeyates/dont_alter_options_parameter

Make changes to a copy of the options parameter