purge loaded modules after creating fake module, not before
Merge pull request #409 from boegel/module_purge

purge loaded modules after creating fake module, not before