Ensure resource responses don't contain duplicates

* Previously, if multiple extended query parameters were used, and the
  same resource matched multiple queries, that resource may be included
  multiple times in the collection response.  This change ensures the
  resource is included only once.