Fixes crash when generating random maps.
We must not be in a request when calling the ScriptInterface destructor.