Fix for ArrayOutOfBoundsException if reservoir has too many samples and
causes integer overflow.