Map variable not saving correctly?

No, if you don’t store the result of FIND in a temp var immediately, it’s gonna FIND multiple times and return a different copy each time, so you would modify the first copy and then ADD or SET a second copy (unmodified), which wouldn’t do anything.