anchor.diff:              match schemaObj with
               | null ->
                   failwithf "Cannot compile object '%s' when schema is 'null'" tyName
  +            | _ when schemaObj.Reference <> null && not <| schemaObj.Reference.Id.EndsWith(tyName) ->
  +                ns.ReleaseNameReservation tyName
  +                compileByPath <| schemaObj.Reference.ReferenceV3
               | _ when schemaObj.UnresolvedReference ->
                   match pathToType.TryGetValue schemaObj.Reference.ReferenceV3 with
                   | true, ty ->
  
positive.code:                     ty
                  | _ -> failwithf "Cannot compile object '%s' based on unresolved reference '%O'" tyName schemaObj.Reference.ReferenceV3
              //| _ when schemaObj.Reference <> null && tyName <> schemaObj.Reference.Id ->
              | _ when schemaObj.Reference <> null && not <| schemaObj.Reference.Id.EndsWith(tyName) ->
                  ns.ReleaseNameReservation tyName
                  compileByPath <| schemaObj.Reference.ReferenceV3
              | _ when schemaObj.Type = "object" && schemaObj.AdditionalProperties <> null -> // Dictionary ->
                  let elSchema = schemaObj.AdditionalProperties
                  ProvidedTypeBuilder.MakeGenericType(typedefof<Map<string, obj>>, [
                      typeof<string>
                      compileBySchema ns tyName elSchema true ns.RegisterType false
                  ])
              | _ when schemaObj.Type = null || schemaObj.Type = "object" -> // Object props ->
                  compileNewObject()
              | _ ->
  
negative.code:                     let elSchema = schemaObj.Items
                      let elTy = compileBySchema ns (ns.ReserveUniqueName tyName "Item") elSchema true ns.RegisterType false
                      elTy.MakeArrayType(1)
                  //| Enum _          -> typeof<string> //NOTE: find better type
                  | ty, format ->
                      failwithf "Type %s(%s,%s) should be caught by other match statement (%A)" tyName ty format schemaObj.Type
  