Constraint on randc

What values were you expecting?

The solution space are the values 4, 5, 6, 7, and 8.

So that means you need to call randomize() 5 times before any value repeats.