transform(): Actually don't modify the input arg.

We previously did a `.dup`, but that was insufficient, because as-of the
introduction of dotted field extraction, we will mutate subhashes, which
`.dup` doesn't clone.