An earlier version of the code put the rules in a dict keyed by group, so they were checked in arbitrary order. The current version leaves them in the list from the config, so the ordering is preserved.