Packaging nested subflows

I'm having troubles packaging nested subflows into the same npm package (packaging the nodes separately is not an option).

I've created a proof of concept with three simple subflows: Subflow A thats uses Subflow B which uses Subflow C. Inside the package I just need to change the way the subflows are referenced (instead of "subflow:" use "my-subflow-type".
I've a script for that and it works perfectly.

Then I apply the same script to a more complex subflows and something is going wrong but the logs here are not helping

Here NR is not finding a node type "flows-orchestrator-contact-io", in only loads the two function nodes (the node flows-orchestrator-contact-io is visible in the palette, it's working and is correctly referenced with the type and not the subflow:).

So there's something going wrong here, my question is: where in the code I can find the place that loads the subflow in order to do some debugging? I've searched the code base for "start module:" (in order to debug near these line of codes) but I've found nothing.

Can anyone help?