Fix a crash when deleting a viewer node, deleting the pane where the
viewer tab was and then undoing the deletion of the viewer node.