Fixes #4417. R=golang-dev, iant, minux.ma, bradfitz CC=golang-dev, vova616 https://golang.org/cl/6782097