Currently the custom entities are loaded like blocks, all the Lua functions are not recreated.
I'm currently solving this by adding a manager in lcluascript, it will contain all the Insert which are custom entities.
All the plugins have to declare themselves, they will be warned by the manager and they recreate the CustomEntity and remove the Insert