Use a memoized comparator for jsTree sorting