check that random is the first rule in a rule-group. fixes #165