code: private void flattenSimpleStubDeclaration(Name name, String alias) {
      Ref ref = Iterables.getOnlyElement(name.getRefs());
      Node nameNode = NodeUtil.newName(compiler, alias, ref.getNode(), name.getFullName());
      Node varNode = IR.var(nameNode).useSourceInfoIfMissingFrom(nameNode);
  
      checkState(ref.getNode().getParent().isExprResult());
      Node parent = ref.getNode().getParent();
      Node grandparent = parent.getParent();
      grandparent.replaceChild(parent, varNode);
      compiler.reportChangeToEnclosingScope(varNode);
    }
docs: Flattens a stub declaration.
  This is mostly a hack to support legacy users.