Fix possible crash in unit_script.lua (modified FLOZi commit)

Lua crash can occur here if a gadget using coroutines calls an animation in a LUS script, as the running coroutine does not belong to the activeUnit.