Fix stopping scripts in the script editor
Merge pull request #3092 from ctrlaltdavid/19789

Code Review for Job #19789