Convert ModuleFileIndex to a module-level service.