- // If this is a child document, use the parent's cache instead.
- Buffer const * const pbuf = d->parent();
- if (pbuf && scope != UpdateChildOnly)
+ // FIXME This is probably unnecessary, given where we call this.
+ // If this is a child document, use the master's cache instead.
+ Buffer const * const pbuf = masterBuffer();
+ if (pbuf != this && scope != UpdateChildOnly)