My guess would be that the for..each.. intrinsics do not work the same way.

In KiXtart my guess is that an internal copy of the array or object is created and the for..each.. works on this. Check out the following code:
code:
Dim $a[10]
For $i = 0 to 9
$a[$i]=chr($i+65)
Next

For Each $s in $a
"Data=" $s ?
Redim Preserve $a[5]
Next

This code prints all elements originally created in $a, despite the redim.

Perhaps the ".keys" method returns each key, each time it is called? Or does it simply return nothing?

If it returns a single key for each iteration, perhaps ypu can get away with:
code:
$sKey=hash.keys
While $sKey
$sKey=hash.keys
Loop

If this is not the case, perhaps you can extend the object and add ".reset" and ".nextkey" methods and work off an internal pointer?