Fix tabs so that they are equipped to handle on-the-fly changes to
selectedIndex.