Fix possible race condition in go/exp/12 Directory.Update().