always sorts by id so pagination is deterministic #3322

User specified sorts have higher priority. I removed the distinct
option becuase there should never be duplicate rows. If there somehow
are duplicates I assume they should be displayed.