Fix crashes when closing panes: splitters were not destroyed correctly.