Avoid invalid query "SELECT DISTINCT DISTINCT" in order search

Weird issue. The double DISTINCT seems to be added by kaminari, couldn't
reproduce it in a spec or in clean rails app

e.g. This query would also result in the same error (or any query
similar within Spree)

    Shipment.where(inventory_units: { id: "a" }).includes(:inventory_units).uniq.page(1).to_a