Ok, it did not hang this 2 times, but result is strange. Please have a look:
How keyframes looked
What script did:
Log:
https://dl.dropboxusercontent.com/u/17452116/Debug.zip
How keyframes looked
What script did:
Log:
https://dl.dropboxusercontent.com/u/17452116/Debug.zip