anchor.diff:        }
         uri = rewrittenUri;
   
  -      FileSource source = FileSource(resource, uri);
  -      WorkspacePackage? workspacePackage = _workspace?.findPackageFor(path);
  -      FeatureSet featureSet = contextFeatureSet(path, uri, workspacePackage);
  -      Version packageLanguageVersion =
  -          contextLanguageVersion(path, uri, workspacePackage);
  -      file = FileState._(this, path, uri, source, workspacePackage, featureSet,
  -          packageLanguageVersion);
  -      _pathToFile[path] = file;
  -      _uriToFile[uri] = file;
  -      _addFileWithPath(path, file);
  -      file.refresh();
  +      file = _newFile(resource, path, uri);
       }
       return Either2.t1(file);
     }
  
positive.code:     _clearFiles();
    }
  
    void _addFileWithPath(String path, FileState file) {
      knownFilePaths.add(path);
      knownFiles.add(file);
      fileStamp++;
    }
  
    /// Clear all [FileState] data - all maps from path or URI, etc.
    void _clearFiles() {
      _uriToFile.clear();
  
negative.code:     if (file == null) {
        File resource = _resourceProvider.getFile(path);
        Source fileSource = resource.createSource();
        Uri uri = _sourceFactory.restoreUri(fileSource)!;
        file = _newFile(resource, path, uri);
      }
      return file;
    }
  