Try solution in this thread?
With GitHub - DanEngelbrecht/LuaScriptInstance: Library to expose access for getting and setting the current script instance
This is of course something that a real solution is needed.