Refactor rule index assignment slightly.