better handle tab selection

Especially when data regarding the current tab may not be available at link time