to_kasket_query: check for :id includes instead of last element