Fix signature of TextIndex.sort (it would fail when e.g. raise_unsortable was passed).