In some instances the wrong objectReferences were picked. That happened because vectors and arrays first added their children to the objectReferences array, and then themselves. This way if an array was e.g. :
[[1,1], [2,2], [3,3], [4,4], [1,1]]; it would end up as :
[[1,1], [2,2], [3,3], [4,4], [3,3]]; ( last entry picked a wrong reference ).
Pulling up the objectReferences.push before the arrays and vectors are looped fixes that.
In some instances the wrong objectReferences were picked. That happened because vectors and arrays first added their children to the objectReferences array, and then themselves. This way if an array was e.g. :
[[1,1], [2,2], [3,3], [4,4], [1,1]];
it would end up as :[[1,1], [2,2], [3,3], [4,4], [3,3]];
( last entry picked a wrong reference ).Pulling up the
objectReferences.push
before the arrays and vectors are looped fixes that.