fix segfault when calling StopScript builtin with no parameters

Whole thing is also broken for multiple extension points similar to #5563. Comments on removal/deprecation please?