support nested all/either queries