+ // LASSERT: There have been several bugs around this code, that seem
+ // to involve failures to reset the anchor. We can at least not crash
+ // in release mode by resetting it ourselves.
+ LASSERT(anchor_.depth() >= depth(),
+ const_cast<DocIterator &>(anchor_) = *this);
+