First, to be clear, there's never a time when"runs" twice in practice. has run-once protection: it exits immediately if it's already run.*
Since all 4 of your scripts run synchronously, thefor "generated-name" one never runs because the "copied-name" one has always run first.
So, in practice, for as long as you had both of the embed codes in place, you were:
- creating a new Munchkin cookie (which is not linked to custom info at all, and will be reused) or using an existing cookie
- sending a Visit Web Page event with invalid custom metadata for that page
Historical Visit Web Page activities from when the embed code was correct, but the session was not yet associated (anonymous) will be merged into the known lead. You can't recover the VWP activities that contained invalid information.
* Yes, technically that means the function is entered each time, but as far as side effects it's run-once.