After T226697, clicking on a column header three times will return the column to the initial sort order. Ideally this would also restore any rowspans in the original table. It should also return any rows marked sorttop or sortbottom to their original place.
Currently, these features of the original table can't be restored, since they aren't stored anywhere.