Flow variable changes when it shouldn't

Discussed here: Changes to Context Flow Variable also changes source array it was extracted from

In short, the pass-by-reference nature of JavaScript means you have to be careful with this sort of thing, and explicitly clone objects if you don't want them being modified.