added a check that modules are enabled by the compiler before calling @import