Revert "cquery --nohost_deps" to include source files.

This was switched in https://github.com/bazelbuild/bazel/commit/171a7ebd9a28c4169f2c3018b9c4d740dadcf324. It makes more sense to include source files. This isn't strictly correct: https://github.com/bazelbuild/bazel/issues/9334#issuecomment-530562016. But given the inherent ambiguity it's better to return too many results than too few.

Fixes https://github.com/bazelbuild/bazel/issues/9334.

PiperOrigin-RevId: 268731551
diff --git a/src/main/java/com/google/devtools/build/lib/query2/PostAnalysisQueryEnvironment.java b/src/main/java/com/google/devtools/build/lib/query2/PostAnalysisQueryEnvironment.java
index 783298b..0048197 100644
--- a/src/main/java/com/google/devtools/build/lib/query2/PostAnalysisQueryEnvironment.java
+++ b/src/main/java/com/google/devtools/build/lib/query2/PostAnalysisQueryEnvironment.java
@@ -341,8 +341,12 @@
             deps.stream()
                 .filter(
                     dep ->
-                        getConfiguration(dep) != null
-                            && !getConfiguration(dep).isToolConfiguration())
+                        // We include source files, which have null configuration, even though
+                        // they can also appear on host-configured attributes like genrule#tools.
+                        // While this may not be strictly correct, it's better to overapproximate
+                        // than underapproximate the results.
+                        getConfiguration(dep) == null
+                            || !getConfiguration(dep).isToolConfiguration())
                 .collect(Collectors.toList());
       }
     }