Speed up field queries

On my laptop, this simple change speeds up this operation up by hundreds
of times, finishing in, say, 89 msec instead of 46 seconds.  It may
still be too slow for really high-cardinality fields, however
(3.5 sec for 263K values - borderline).