Sort unique column IDs prior to label matching