Fix problem with assigning indices to tabs in DataViewport