fix(library/module): allow multiple calls to import_modules with the same modules

The idea is to store a set of already imported files.
This feature is useful when using the import_modules API directly (e.g.,
from javascript).
fix(library/module): allow multiple calls to import_modules with the same modules