It looks like the current code does not make a copy as expected (probably, it does make a copy but of the lookup dict, which then still points to the original form).
This PR (untested yet) should fix that by first accessing the form in the lookup, and then making a copy of it.
The last option, which is not as "clean" but always works, is to JSON.stringify and then JSON.parse.
It looks like the current code does not make a copy as expected (probably, it does make a copy but of the lookup dict, which then still points to the original form).
This PR (untested yet) should fix that by first accessing the form in the lookup, and then making a copy of it.
The last option, which is not as "clean" but always works, is to JSON.stringify and then JSON.parse.