Increased robustness of testScriptRandom