One idea ( maybe a little complex but..) would be to have 6 different frames that you go to before a new frame. There you can specify which rand-frame there are.
If yoy want to avoid frame 4 among frames 1-6 how could you write that in the code?