[FIX] Active tab overrides hidden/disabled state

This is necessary to avoid JS breaking the whole page if a static tab
control is displayed but its active tab does not exist (because it's
hidden or disabled)