Supresses error when Tab selectedIndex is out of range

Avoids stopping script when called select() with an index out of range (for a reason of using index saved in local storage by different version).