Fix undoing file insertion.