Remove unnecessary wrapper in return value of BlazeQueryEnvironment#getTarget(Label).

--
MOS_MIGRATED_REVID=85744195
diff --git a/src/main/java/com/google/devtools/build/lib/query2/BlazeQueryEnvironment.java b/src/main/java/com/google/devtools/build/lib/query2/BlazeQueryEnvironment.java
index d6c2992..7fabdc7 100644
--- a/src/main/java/com/google/devtools/build/lib/query2/BlazeQueryEnvironment.java
+++ b/src/main/java/com/google/devtools/build/lib/query2/BlazeQueryEnvironment.java
@@ -270,11 +270,11 @@
     return result;
   }
 
-  public Node<Target> getTarget(Label label) throws TargetNotFoundException, QueryException {
+  public Target getTarget(Label label) throws TargetNotFoundException, QueryException {
     // Can't use strictScope here because we are expecting a target back.
     validateScope(label, true);
     try {
-      return getNode(getTargetOrThrow(label));
+      return getNode(getTargetOrThrow(label)).getLabel();
     } catch (NoSuchThingException e) {
       throw new TargetNotFoundException(e);
     } catch (InterruptedException e) {
@@ -544,7 +544,7 @@
         if (value != null) {
           for (Label label : attrType.getLabels(value)) {
             try {
-              result.add(getTarget(label).getLabel());
+              result.add(getTarget(label));
             } catch (TargetNotFoundException e) {
               reportBuildFileError(caller, errorMsgPrefix + e.getMessage());
             }