anchor.diff:                      )
           )
       interface ITypeHandler with
  -        member this.GetKnownTypes = upcast []
  +        member this.DefinedTypes = upcast [ mapping.Value.VariableType.Type ]
           member this.GetMapping(targetType) =
               if targetType = typeof<'output> then
                   Some mapping.Value
               else None
   
  -type RootTypeHandler(customContext : ITypeHandler -> ITypeHandler) as this =
  +type IMetaTypeHandler =
  +    /// Given a reference to the root type handler that will ultimately
  +    /// handle all supported types, produce a sequence of additional type handlers,
  +    /// in order of priority ascending (the last handler will be tried first).
  +    abstract member Handlers : rootHandler : ITypeHandler -> ITypeHandler seq
  +
  +type RootTypeHandler(metaHandler : IMetaTypeHandler) as this =
       let mappingCache = new Dictionary<Type, TypeMapping option>()
  -    let mutable context : ITypeHandler = Unchecked.defaultof<ITypeHandler>
  -    do
  -        context <-
  -            customContext(this :> ITypeHandler) // custom types get first precedence
  -            <??> new BuiltinTypeHandler()
  -            <??> new NullableTypeContext(this :> ITypeHandler)
  -            <??> new ArrayTypeContext(this :> ITypeHandler)
  -            <??> new CollectionTypeContext(this :> ITypeHandler)
  -            <??> new EnumerableTypeContext(this :> ITypeHandler)
  -            <??> new SingleConstructorTypeContext(this :> ITypeHandler)
  -    static let defaultInstance = new RootTypeHandler(fun _ -> new ZeroTypeHandler() :> ITypeHandler)
  +    let context =
  +        lazy(
  +            let root = this :> ITypeHandler
  +            let zero = new ZeroTypeHandler() :> ITypeHandler
  +            let customHandler =
  +                Seq.fold (??<) zero (metaHandler.Handlers(root))
  +            customHandler
  +            ??> new BuiltinTypeHandler()
  +            ??> new NullableTypeHandler(root)
  +            ??> new ArrayTypeHandler(root)
  +            ??> new CollectionTypeHandler(root)
  +            ??> new EnumerableTypeHandler(root)
  +            ??> new SingleConstructorTypeHandler(root)
  +        )
  +    static let defaultInstance =
  +        new RootTypeHandler
  +            ({ new IMetaTypeHandler with
  +                member __.Handlers(_) = upcast []
  +            })
       static member Default = defaultInstance :> ITypeHandler
       interface ITypeHandler with
  -        member this.GetKnownTypes = context.GetKnownTypes
  +        member this.DefinedTypes = context.Value.DefinedTypes
           member this.GetMapping(targetType) =
               let mutable cached = None
               if (not <| mappingCache.TryGetValue(targetType, &cached)) then
  -                cached <- context.GetMapping(targetType)
  +                cached <- context.Value.GetMapping(targetType)
                   mappingCache.[targetType] <- cached
               cached
positive.code:             cons.Invoke([|collection|])
          | _ -> failwith "Value not suitable for IEnumerable initialization"
      interface ITypeHandler with
          member this.GetKnownTypes = upcast []
          member this.GetMapping(targetType) =
              let interfaces = targetType.GetInterfaces()
              let ienumerable =
  
negative.code:             else None
  
  /// Handles T[] arrays, where T is supported by `rootHandler`.
  type ArrayTypeHandler(rootHandler : ITypeHandler) =
      let translateArray clrElementType value =
          match value with
          | NullValue -> null
  