[rqlrewrite] sort possible types when turning is_instance_of into is [applied]