Bugfix: Trying to sort a table without active columns threw an error

Change-Id: Ife8bba278a49348393a7792eb57e44ccc15da51d