introduce TDF_compare_debug, omit OBJ_TYPE_REF casts with it