anchor.diff:              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))
  +    let cacheResult = 
  +        if keyOk then 
  +            if opts.pdbDirPath.IsSome then None // can't used a cached entry when reading PDBs, since it makes the returned object IDisposable
  +            else ilModuleReaderCacheLock.AcquireLock (fun ltok -> ilModuleReaderCache.TryGet(ltok, key))
           else 
               None
  -    
  -    match cacheResult1 with 
  +
  +    match cacheResult 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) 
  
positive.code:         member x.Dispose() = dispose()
      
  // ++GLOBAL MUTABLE STATE (concurrency safe via locking)
  type ILModuleReaderCacheKey = ILModuleReaderCacheKey of string * DateTime * ILScopeRef * bool * ReduceMemoryFlag * MetadataOnlyFlag
  
  // Cache to extend the lifetime of a limited number of readers that are otherwise eligible for GC
  type ILModuleReaderCache1LockToken() = interface LockToken
  let ilModuleReaderCache1 =
      new AgedLookup<ILModuleReaderCache1LockToken, ILModuleReaderCacheKey, ILModuleReader>
             (stronglyHeldReaderCacheSize, 
              keepMax=stronglyHeldReaderCacheSize, // only strong entries
              areSimilar=(fun (x, y) -> x = y))
  let ilModuleReaderCache1Lock = Lock()
  
  // // Cache to reuse readers that have already been created and are not yet GC'd
  let ilModuleReaderCache2 = new ConcurrentDictionary<ILModuleReaderCacheKey, System.WeakReference<ILModuleReader>>(HashIdentity.Structural)
  
  let stableFileHeuristicApplies fileName = 
      not noStableFileHeuristic && try FileSystem.IsStableFileHeuristic fileName with _ -> false
  
negative.code: #nowarn "42" // This construct is deprecated: it is only for use in the F# library
  
  open System
  open System.Collections.Generic
  open System.Diagnostics
  open System.IO
  