You should assert that `model._id` is same as `lastId` before you discard the old `lastId` value.