Depends on CL 8715043 and CL 8676050. Fixes #5273. R=alex.brainman, r CC=gobot, golang-dev https://golang.org/cl/8764043