Fixes #7742 LGTM=dave, rsc R=rsc, bradfitz, dave CC=golang-codereviews https://golang.org/cl/85580047