x/vgo: fix incorrect go.mod panic
x/vgo: fix incorrect go.mod panic

Checks f.Module first, if f.Module == nil then init it.

Fixes golang/go#24181

Change-Id: I4e8cfb688654e89422ae14562283188a483079ca
Reviewed-on: https://go-review.googlesource.com/106800
Reviewed-by: Russ Cox <5ad239cb8a44f659eaaee0aa1ea5b94947abe557@golang.org>
Run-TryBot: Russ Cox <5ad239cb8a44f659eaaee0aa1ea5b94947abe557@golang.org>
TryBot-Result: Gobot Gobot <66cb808b70d30c07676d5e946fee83fd561249e5@golang.org>

golang/vgo,golang/vgo