This is an antipattern:
(if (not (ScriptID 8)) (ScriptID 8)) ; Ensure script is loaded
(if (IsObject (ScriptID 8 1))
In the first line, the if-expression will never be true, because ScriptID always loads the script.
In the second, it will never be false, for the same reason.
Unless you miscompile that script somehow. Sierra just did:
(ScriptID 8)