Speedup query: changed index on tag collection such that indices are processed only if they are sufficiently few.