Fixed setModuleDefaults() to not rely on immutable configs