Use iterators rather than indices to make this forwards-compatible with a change...