util.pubsub: fix bug, the query element should be indexed when closing the x tag.