Fix bug where if local write fails, it would end up proxying the write twice.