Remove ticket reference, refactor logic in QuerySet.is_compatible_query_object_type