Sort internal type sets by intern id.