Invalid RootIndex in AnimBlueprintGeneratedClass::Link

I have a custom animation node which is part of a plugin and at the time does nothing more than copying the input to the ouput.
I can add the node to a anim blueprint and it works without problems but when i save the blueprint and restart the engine an assertion AnimBlueprintGeneratedClass::Link fails, which ensure the Root Index is valid.

What could cause the rootIndex to be invalid?

NoNoid

The problem was that the module with the UAnimGraphNode wasn’t loaded early enough.
Changing the loading phase of the plugin to ‘PreDefault’ solved the problem.