fix dup for const/immutable reference type elements

The second overload takes care of all cases where the elements can be
converted to mutable. So, the first overload has no business
Unconst-ing anything.
That's not how `dup` was meant to work, it explicitly converts to mutable data.