#tag_query: added logic to persist the and/or condition of a filter