On second thought, there's not much point in doing this *before* `assumeSafeAppend` is fixed. So we can either keep this pull request open, and I'll add to it later, or we can merge it and I'll open a new one for the `assumeSafeAppend` change.