The measuring pass keeps the layout it last drew as a string key and skips the redraw when a pass measures the same again. Replacing the document maps every decoration away, so an identical layout has to be drawn again — the guard now compares the live decoration count as well. Two documents with the same tab layout otherwise left every tab on the default grid.