Added a tailrec annotation to GroupingIterator::hasNext().