Bugfix #746. Fixed sorting tables with more than one row header.