Hi
Issue:
If modules are loaded without any node dependency(i.e: on page load), the function 'create_menu' is called implicitly to generate menu items.
But when the modules are loaded when its dependent node expands, the function 'create_menus' has to explicitly call after 'add_menus' from respective module's template files.
This patch is dependent on patch 'load_modules_js_when_required.patch'
Please find attached patch and review.