As part of investigating the issue with snippets plugin, I noticed that EVENT_LAYOUT_BODY_END is firing before the JS libraries are rendered on the page. This is incorrect as it does not give any opportunity to plugins to load dependent JS files. The event should fire directly before </body>