Address the mixed-case condition, and group items with different cases properly.