Dictionary Assignment Breaks the Iteration!

Let’s check the following code first:

dict[btn1] = false;
dict[btn2] = false;
dict[btn3] = false;

for (var key:Object in dict)
{
dict[key] = true;
}

How many times do you think the loop would be entered in this case?

NOT only 3!

I run the codes in flash player 11.1, it sometimes was 4! Under flash player 11.5, I haven’t encountered any issue.