Fix possible test failure with number of discarded values