Comment made by: thheller
set-loaded!
should only be called once per module, so it must be appended to the module itself not to individual files in the module.
By appending to individual files you will eventually call it more than once for modules that have multiple entries. AFAICT the call is not idempotent and may cause events to be emitted multiple times. At the very least it may call set-loaded!
before the full module has actually been loaded. Since it immediately triggers the callbacks that may lead to bad results.
The config options are generally useful not just for the loader.