Allow reopening file in editor after it's been closed through tabs.

Fixed #2030

review: @devoncarew