We already keep an extra accumulator in `do_uniq` so there is no extra memory use.