title: Order by distinct result throws an error
body: <p>Trying to run the following pseudo query in the browser:</p>
  
  <pre><code>Match (p:Person)...
  return distinct {personID: p.personID...}
  order by p.PersonID
  </code></pre>
  
  <p>throws the following error:</p>
  
  <blockquote>
    <p>p is not defined.</p>
  </blockquote>
  
  <p>If I remove "distinct" then it works fine. Any ideas how to get this working?</p>