title: Expanding a OData function call result throws exception since upgrading generator to 2.4
body: <p>I've updated OData Client T4 Template from 2 to 2.3 and this is no longer working.</p>
  
  <pre><code> _container.Users.GetLoggedInUser().Expand(x =&gt; x.Debtor);
  </code></pre>
  
  <p>This is the new generated code</p>
  
  <pre><code>    [global::Microsoft.OData.Client.OriginalNameAttribute("GetLoggedInUser")]
      public static global::Something.OData.Client.SomethingPortal.Data.UserSingle GetLoggedInUser(this global::Microsoft.OData.Client.DataServiceQuery&lt;global::Something.OData.Client.SomethingPortal.Data.User&gt; source)
      {
          if (!source.IsComposable)
          {
              throw new global::System.NotSupportedException("The previous function is not composable.");
          }
  
          return new global::Something.OData.Client.SomethingPortal.Data.UserSingle(source.CreateFunctionQuerySingle&lt;global::Something.OData.Client.SomethingPortal.Data.User&gt;("Default.GetLoggedInUser", false));
      }
  </code></pre>
  
  <p>This was what was generated by version 2</p>
  
  <pre><code>    public static global::Something.OData.Client.SomethingPortal.Data.UserSingle GetLoggedInUser(this global::Microsoft.OData.Client.DataServiceQuery&lt;global::Something.OData.Client.SomethingPortal.Data.User&gt; source)
      {
          if (!source.IsComposable)
          {
              throw new global::System.NotSupportedException("The previous function is not composable.");
          }
  
          string parameterString = global::Microsoft.OData.Client.Serializer.GetParameterString(source.Context);
          return new global::Something.OData.Client.SomethingPortal.Data.UserSingle(source.Context, source.GetPath("Default.GetLoggedInUser" + parameterString), false);
      }
  </code></pre>
  
  <p>And this is what the schema for this function looks like</p>
  
  <pre><code>  &lt;Function Name=""GetLoggedInUser"" IsBound=""true""&gt;
      &lt;Parameter Name=""bindingParameter"" Type=""Collection(SomethingPortal.Data.User)"" /&gt;
      &lt;ReturnType Type=""SomethingPortal.Data.User"" /&gt;
    &lt;/Function&gt;
  </code></pre>
  
  <p>The exception thrown is </p>
  
  <blockquote>
    <p>Message = "Individual properties can only be selected from a single resource or as part of a type. Specify a key predicate to restrict the entity set to a single instance or project the property into a named or anonymous type."</p>
  </blockquote>
  
  <p>Is this a bug in 2.4 or is there a change I need to make somewhere?</p>
  
  <p>Thanks</p>