Actually allow using RootIndex in an UpSource-like environment. Without ...

...this fix, a cyclic dependency is present (ModuleRootManagerImpl requires passing a DirectoryIndex to its constructor, and the constructor of RootIndex accesses ModuleRootManager.getInstance()).