res/res_stasis: Fix crash on module unload while performing operation