Perhaps we should rename the `recordIndex` argument to `expectedRecordIndex`?