Fixed #454: Don't switch tab while replacing a given tab

TBR: @devoncarew