Script/SAI: Fix runtime error. Thanks @Kirkhammett

Closes #9653

(Can not commit for other authors using the web interface...)