anchor.diff:                  | None -> ()
                   | Some(document) ->                           
                       optionsManager.ClearSingleFileOptionsCache(document.Id)
  -                    projectContext.Dispose()
  -                    files.[newFilePath] <- projectContextFactory.CreateProjectContext(newFilePath)
  +                    projectContext.Value.Dispose()
  +                    let newProjectContext = lazy projectContextFactory.CreateProjectContext(newFilePath)
  +                    if files.TryAdd(newFilePath, newProjectContext) then
  +                        newProjectContext.Force() |> ignore
               else
  -                projectContext.Dispose() // fallback, shouldn't happen, but in case it does let's dispose of the project context so we don't leak
  +                projectContext.Value.Dispose() // fallback, shouldn't happen, but in case it does let's dispose of the project context so we don't leak
           | _ -> ()
   
   [<Sealed>]
  
positive.code:                                              miscFilesWorkspace: Workspace, 
                                               projectContextFactory: IFSharpWorkspaceProjectContextFactory) =
  
      // We have a lock because the `ScriptUpdated` event may happen concurrently when a document opens or closes.
      let gate = obj()
      let files = ConcurrentDictionary(StringComparer.OrdinalIgnoreCase)
      let optionsManager = workspace.Services.GetRequiredService<IFSharpWorkspaceService>().FSharpProjectOptionsManager
  
      static let mustUpdateProjectReferences (refSourceFiles: string []) (projectContext: IFSharpWorkspaceProjectContext) =
  
negative.code:             // a F# miscellaneous project, which could be a script or not.
              if document.Project.IsFSharp && workspace.CurrentSolution.GetDocumentIdsWithFilePath(document.FilePath).Length = 0 then
                  let filePath = document.FilePath
                  let createProjectContext = lazy projectContextFactory.CreateProjectContext(filePath)
                  if files.TryAdd(filePath, createProjectContext) then
                      createProjectContext.Force() |> ignore
          )
  
          workspace.DocumentOpened.Add(fun args ->
              let document = args.Document
              if not document.Project.IsFSharpMiscellaneousOrMetadata then
                  match files.TryRemove(document.FilePath) with
                  | true, projectContext ->
                      (projectContext.Value :> IDisposable).Dispose()
                      tryRemove document
                  | _ ->
                      ()
          )
  
          workspace.DocumentClosed.Add(fun args ->
              let document = args.Document
              if document.Project.IsFSharpMiscellaneousOrMetadata then
                  tryRemove document
          )
  
          workspace.WorkspaceChanged.Add(fun args ->
  