Fixes #1487. R=rsc, alex.brainman, go.peter.90, mikioh.mikioh, mattn.jp CC=golang-dev https://golang.org/cl/4600042