cmd/go: fix 'go vet' of package with external tests

For example, fixes 'go vet syscall', which has source
files in package syscall_test.

Fixes issue 8511.

LGTM=r
R=golang-codereviews, r
CC=golang-codereviews, iant
https://codereview.appspot.com/152220044