Minor optimization -- use TagSet instead of Set.