Yes, there was indeed something wrong. I have now managed to get it to run on all PCs here. It was a double problem: First the bug in your script, and then an additional engine bug that only occurred on certain 3D hardware configurations.

This will be fixed in the next update, 6.50. Thanks for helping to identify and fix this bug.