size_t n = slices_.size();
for (; i != n; ++i) {
CursorSlice & cs = slices_[i];
- if (&cs.inset() != inset) {
+ if (&cs.inset() != inset || !cs.inset().editable()) {
// the whole slice is wrong, chop off this as well
--i;
LYXERR(Debug::DEBUG, "fixIfBroken(): inset changed");