anchor.diff:              if newP = null then
                   failwithf "Property '%O' of type '%O' not found in '%s'" p t toAsm.Location
               newP)
  +
  +    let private replaceField asmMappings (f : FieldInfo) =
  +        if f.GetType() = typeof<ProvidedField> then f
  +        else replace asmMappings (f, getAssemblies f.DeclaringType) (fun toAsm ->
  +            let t = getType toAsm f.DeclaringType (replaceType asmMappings)
  +            let bindingFlags = (if f.IsPublic then BindingFlags.Public else BindingFlags.NonPublic) ||| 
  +                               (if f.IsStatic then BindingFlags.Static else BindingFlags.Instance)
  +            let newF = t.GetField(f.Name, bindingFlags)
  +            if newF = null then
  +                failwithf "Field '%O' of type '%O' not found in '%s'" f t toAsm.Location
  +            newF)
       
       let private replaceMethod asmMappings (m : MethodInfo) =
           if m.GetType() = typeof<ProvidedMethod> then m
  
positive.code:     let private getType (asm:Assembly) (t:Type) rt =
          let getFullName (t:Type) =
              let fullName = t.FullName        
              if fullName.StartsWith("FSI_")
              then fullName.Substring(fullName.IndexOf('.') + 1)
              else fullName
          let newT =
              if t.IsGenericType && not t.IsGenericTypeDefinition then 
                  let genericType = t.GetGenericTypeDefinition()
                  let newT = asm.GetType (getFullName genericType)
                  if newT = null then 
                      null
                  else
  
negative.code:     let rec private replaceExpr asmMappings varTable reversePass quotation =
          let rt = replaceType asmMappings
          let rp = replaceProperty asmMappings
          let rf = replaceField asmMappings
          let rm = replaceMethod asmMappings
          let rc = replaceConstructor asmMappings
          let ru = replaceUnionCase asmMappings
          let rv = replaceVar asmMappings varTable reversePass
          let re = replaceExpr asmMappings varTable reversePass
          
          match quotation with
          | Call (obj, m, args) -> 
              match obj with
              | Some obj -> Expr.Call (re obj, rm m, List.map re args)
              | None -> Expr.Call (rm m, List.map re args)
          | PropertyGet (obj, p, indexArgs) -> 
              match obj with
              | Some obj -> Expr.PropertyGet (re obj, rp p, List.map re indexArgs)
              | None -> Expr.PropertyGet (rp p, List.map re indexArgs)
          | PropertySet (obj, p, indexArgs, value) -> 
              match obj with
              | Some obj -> Expr.PropertySet (re obj, rp p, re value, List.map re indexArgs)
              | None -> Expr.PropertySet (rp p, re value, List.map re indexArgs)
          | NewObject (c, exprs) ->
              Expr.NewObject (rc c, List.map re exprs)
          | Coerce (expr, t) ->
  