Indices query/filter skip parsing altogether for irrelevant indices

Fixes #2416