Switch back to `Hash.dup`
#26305

kamipo wants to merge kamipo:follow-up-to-26301 into rails:master

We do not currently have an analysis of these two commits