This is the BUG on v6 and on v7 is fixed.
{
:global TestVar;
:if ($TestVar = nil) do={
:set TestVar [:toarray ""];
:set ($TestVar->"nbr1") [:toarray ""];
:set ($TestVar->"nbr1"->"count") 0;
}
:local nbr1 ($TestVar->"nbr1"); # BUG on v6, instead of copy inner array, is copied the memory position
:set ($nbr1->"count") (($nbr1->"count") + 1);
:put ($nbr1->"count");
:put $TestVar; # is influenced because the presence of the BUG.
}