anchor.diff:  
               match optFilter with 
               | Some nm -> 
  -                LookupTypeNameInEntityMaybeHaveArity (ncenv.amap, m, nm, staticResInfo, tcref)
  -                    |> List.map (MakeNestedType ncenv tinst m) 
  +                let tcrefs = LookupTypeNameInEntityMaybeHaveArity (ncenv.amap, m, ad, nm, staticResInfo, tcref)
  +                tcrefs |> List.map (MakeNestedType ncenv tinst m) 
               | None -> 
   #if EXTENSIONTYPING
                   match tycon.TypeReprInfo with 
                   | TProvidedTypeExtensionPoint info ->
                       [ for nestedType in info.ProvidedType.PApplyArray((fun sty -> sty.GetNestedTypes()), "GetNestedTypes", m) do 
                           let nestedTypeName = nestedType.PUntaint((fun t -> t.Name), m)
  -                        for nestedTcref in LookupTypeNameInEntityMaybeHaveArity (ncenv.amap, m, nestedTypeName, staticResInfo, tcref)  do
  +                        for nestedTcref in LookupTypeNameInEntityMaybeHaveArity (ncenv.amap, m, ad, nestedTypeName, staticResInfo, tcref)  do
                                yield  MakeNestedType ncenv tinst m nestedTcref ]
                   
                   | _ -> 
  
positive.code:             success(resInfo,Item.Value (mkNestedValRef modref vspec),rest)
          | _ ->
          // Something in a type? e.g. a literal field 
          let tcrefs = LookupTypeNameInEntityMaybeHaveArity (ncenv.amap, id.idRange, id.idText, TypeNameResolutionStaticArgsInfo.Indefinite, modref)
          let tcrefs = tcrefs |> List.map (fun tcref -> (resInfo,tcref))
          let tyconSearch = 
              match lid with 
  
negative.code: #endif
  
  /// Lookup a type name in an entity.
  let LookupTypeNameInEntityMaybeHaveArity (amap, m, ad, nm, staticResInfo:TypeNameResolutionStaticArgsInfo, modref: ModuleOrNamespaceRef) = 
      let mtyp = modref.ModuleOrNamespaceType    
      let tcrefs = 
          match staticResInfo with 
  