Fix in-buffer completion when after-change-functions modify the buffer.