Revert "Revert "Load env variables before c.config()""

This reverts commit 4e88859af01376b9977bcc03174c182353c172d4.

Reason for revert: Given https://googleplex-android-review.git.corp.google.com/c/platform/build/soong/+/15747538, we should be able to rollforward with this now.

Bug: b/198045383
Change-Id: I4c069e952d9f77258433b5059f3867293993a64d
diff --git a/cmd/soong_ui/main.go b/cmd/soong_ui/main.go
index 8453413..ffbe7de 100644
--- a/cmd/soong_ui/main.go
+++ b/cmd/soong_ui/main.go
@@ -196,13 +196,12 @@
 		Status:  stat,
 	}}
 
-	config := c.config(buildCtx, args...)
-
 	if err := loadEnvConfig(); err != nil {
 		fmt.Fprintf(os.Stderr, "failed to parse env config files: %v", err)
 		os.Exit(1)
 	}
 
+	config := c.config(buildCtx, args...)
 
 	build.SetupOutDir(buildCtx, config)