Only move further with index if there are matches left.