As said in the comment, includes/embeds can’t alter blocks from their includer.
That said there is an extension available that could solve your problem.
This Deferred Twig Extension
can be found here
Basically the node postpones the execution of a said block.
This way you can create a variable that holds all of your javascript links and output them. This can be seen in the advanced example found on the github.
credits to Eugene Leonovich for making this extension