Adds fully working tree_sort_kernel test