fix(code-editor): switch tabs when a document was loaded twice (#2181)