anchor.diff:          let ilModule, ilAssemblyRefs, pdb = openPE (fullPath, pefile, opts.pdbDirPath, reduceMemoryUsage, opts.ilGlobals, false)
           let ilModuleReader = new ILModuleReaderImpl(ilModule, ilAssemblyRefs, (fun () -> ClosePdbReader pdb))
   
  +        let ilModuleReader = ilModuleReader :> ILModuleReader 
  +
           // Readers with PDB reader disposal logic don't go in the cache. Note the PDB reader is only used in static linking.
           if keyOk && opts.pdbDirPath.IsNone then 
  -            ilModuleReaderCacheLock.AcquireLock (fun ltok -> ilModuleReaderCache.Put(ltok, key, ilModuleReader))
  -
  -        ilModuleReader :> ILModuleReader
  +            ilModuleReaderCache1Lock.AcquireLock (fun ltok -> ilModuleReaderCache1.Put(ltok, key, ilModuleReader))
  +            ilModuleReaderCache2.[key] <- WeakReference<_>(ilModuleReader)
  +
  +        ilModuleReader
   
   [<AutoOpen>]
   module Shim =
  
positive.code:                 let ilModule, ilAssemblyRefs, _pdb = openPE (fullPath, pefile, None, reduceMemoryUsage, opts.ilGlobals, false) 
                  new ILModuleReaderImpl(ilModule, ilAssemblyRefs, ignore)
  
          if keyOk then 
              ilModuleReaderCacheLock.AcquireLock (fun ltok -> ilModuleReaderCache.Put(ltok, key, ilModuleReader))
  
          ilModuleReader :> ILModuleReader
                  
      else
          // This case is primarily used in fsc.exe. 
  
negative.code:             let fakeKey = ILModuleReaderCacheKey(fileName, System.DateTime.UtcNow, ILScopeRef.Local, false, ReduceMemoryFlag.Yes, MetadataOnlyFlag.Yes)
              fakeKey, false
  
      let cacheResult1 = 
          // can't used a cached entry when reading PDBs, since it makes the returned object IDisposable
          if keyOk && opts.pdbDirPath.IsNone then 
              ilModuleReaderCache1Lock.AcquireLock (fun ltok -> ilModuleReaderCache1.TryGet(ltok, key))
          else 
              None
      
      match cacheResult1 with 
      | Some ilModuleReader -> ilModuleReader
      | None -> 
  
      let cacheResult2 = 
          // can't used a cached entry when reading PDBs, since it makes the returned object IDisposable
          if keyOk && opts.pdbDirPath.IsNone then 
              ilModuleReaderCache2.TryGetValue(key)
          else 
              false, Unchecked.defaultof<_>
  
      let mutable res = Unchecked.defaultof<_> 
      match cacheResult2 with 
      | true, weak when weak.TryGetTarget(&res) -> res
      | _ -> 
  
      let reduceMemoryUsage = (opts.reduceMemoryUsage = ReduceMemoryFlag.Yes)
      let metadataOnly = (opts.metadataOnly = MetadataOnlyFlag.Yes) 
  