Don't replace tab if it has been modified (#1645)

review: @devoncarew