Fixed incorrect materials count on terms aggregations. #609

12 jobs for v1-aggregation-counts in 27 minutes and 52 seconds (queued for 9 seconds)