fix issue #1016847 opened file can be reopened in different tab