Because editors like vim use backupfiles and rename them to the original name, the file handle used can point to the wrong file. Reopening the file should fix this.