Fix regressions in document manipulation test.