Issue #2461017 by aerozeppelin, Berdir, Lendude: TaxonomyIndexTid doesn't check whether there are any values before trying to loop over it