Script global function is added to both globalFunctions and scriptFunctions containers. There has to be a check if refcount of it is exactly 2. Somehow I managed to make it 1 and got immediate crash by double disposal (Release from both containers).
Regards,
Alexei