CORE-4868: Fixed the query for (list-folders-in-folder) to return a sorted list