ForIn fix, before i kept the index of the next property to be iterated, but the problem is what if the current property is deleted in the forIn loop then the next property should not be +1, but the with the same index. I ended by rewriting it to fetch a list of property names at first iteration (new properties added within the loop are ignored, as in real browsers), and then to remove from that list as the property is consumed