Ensure inputs to chanjo are cleaned and sorted, attempting to avoid issues identified by @lbeltrame