internal/imports: use ProcessEnv to filter files

In CL 247797 I accidentally used the default build.Context instead of
one generated from the ProcessEnv to match files. This has essentially
no effect because we only allow overriding GOROOT and GOPATH, but it's
still a mistake.

Change-Id: Ibe23c97590fe21609252f048bc2e925f3043dec4
Reviewed-on: https://go-review.googlesource.com/c/tools/+/255777
Trust: Heschi Kreinick <heschi@google.com>
Run-TryBot: Heschi Kreinick <heschi@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
diff --git a/internal/imports/fix.go b/internal/imports/fix.go
index e54692e..a006d6e 100644
--- a/internal/imports/fix.go
+++ b/internal/imports/fix.go
@@ -827,7 +827,11 @@
 }
 
 func (e *ProcessEnv) matchFile(dir, name string) (bool, error) {
-	return build.Default.MatchFile(dir, name)
+	bctx, err := e.buildContext()
+	if err != nil {
+		return false, err
+	}
+	return bctx.MatchFile(dir, name)
 }
 
 // CopyConfig copies the env's configuration into a new env.