Tables sort per column instead of per field.

Fixes UI bug when one field is present multiple times in a table.