Fixed helper function that builds facet query string to build it
appropriately