merge.go: fix data race