Elide unnecessary DenseMap copy.

No functionality change.