Don't throw errors if modules are already defined

Fixes #10.