Fix #404 (bug with overlapping edits)

Review URL: https://chromiumcodereview.appspot.com//12876004