ext.gather.icons is loaded via addModuleStyles (in the special page execute function) and via addModules the onSkinMinervaDefaultModules hook to make sure an icon shows up in the left menu.
addModules always adds the styles AND the JavaScript of a module via JavaScript
addModuleStyles adds the styles of a module via a link tag in the head of the page
Neither know anything about each other. When addModules is run it loads all the styles and JS as a module may have JS that has not been loaded by addModuleStyles as a result we are effectively loading the stylesheet twice.
What we probably want to do is this:
- Split out the icon for the left menu into its own module and add this via onSkinMinervaDefaultModules
We should do this before pushing to stable as HTML and the module name will be cached when added via addModuleStyles