Save correct selected tab for windows with private tabs
(improvement for #36)