Fix a crash with pinned tabs.