Fixed sorting the order of  candidate rules for a state node, by taking this into account: if any required states will be negative by this rule