Fixed instances.deleted abiguity in querylib