Fix bug with renamed tabs (duplicate name)

When the user click on a tab, the tab text reverted back to the
file name instead of the new name.