Bug fixes to custom `modulesDir`