Last matched target still executed when query matches no targets