Changed indexing so it only uses a single index per rule rather than a pair.