Preserve the original state of ARGV by duplicating the array. Closes #787