If successful: update nextIndex and matchIndex