Bugfix for wrong column sorting

Bugfix for wrong column sorting: It can be reproduced by following steps:
1.) ensure there are many columns so that horizontal scrollbar appears
2.) scroll to the right
3.) sort a column via sort link in column header (for example the first visible column)
The table sorts the very first column, not the first visible column.

See commit 5c50f55