anchor.diff:              failwithf "Type '%O' not found in '%s'" t asm.Location
           newT
   
  +    let rec getAssemblies (t:Type) = [
  +        yield t.Assembly
  +        if t.IsGenericType && not t.IsGenericTypeDefinition then
  +            for t in t.GetGenericArguments() do
  +                yield! getAssemblies t
  +    ]
  +
       let rec private replaceType asmMappings (t : Type) =        
           if t.GetType().Name = "ProvidedSymbolType" then t
           elif t.GetType() = typeof<ProvidedTypeDefinition> then t
  -        else replace asmMappings (t, t.Assembly) (fun toAsm -> getType toAsm t (replaceType asmMappings))
  +        else replace asmMappings (t, getAssemblies t) (fun toAsm -> getType toAsm t (replaceType asmMappings))
   
       let private replaceProperty asmMappings (p : PropertyInfo) =
           if p.GetType() = typeof<ProvidedProperty> then p
  -        else replace asmMappings (p, p.DeclaringType.Assembly) (fun toAsm ->
  +        else replace asmMappings (p, getAssemblies p.DeclaringType) (fun toAsm ->
               let t = getType toAsm p.DeclaringType (replaceType asmMappings)
               let isStatic = 
                   p.CanRead && p.GetGetMethod().IsStatic || 
  
positive.code: 
      let private replaceConstructor asmMappings (c : ConstructorInfo) =
          if c.GetType() = typeof<ProvidedConstructor> then c
          else replace asmMappings (c, c.DeclaringType.Assembly) (fun toAsm ->
              let t = getType toAsm c.DeclaringType (replaceType asmMappings)
              let parameterTypes = 
                  c.GetParameters() 
  
negative.code:     let private replaceMethod asmMappings (m : MethodInfo) =
          if m.GetType() = typeof<ProvidedMethod> then m
          elif m.DeclaringType.FullName = "Microsoft.FSharp.Core.LanguagePrimitives+IntrinsicFunctions" then m // these methods don't really exist, so there's no need to replace them
          else replace asmMappings (m, getAssemblies m.DeclaringType) (fun toAsm ->
                  let t = getType toAsm m.DeclaringType (replaceType asmMappings)
                  let parameterTypes = 
                      m.GetParameters() 
  