Clearly, you are correct and I should have used my words more carefully. I should have said; leaking or publicizing the unmasked names. Yes, once an intelligence official determines that a U.S. citizen may be involved in illegal activities, that official, after obtaining the proper warrant may unmask the name for investigative purposes.
If on the other hand, the name was unmasked to do back door surveillance on U.S. citizens, that is an entirely different issue. Both the unmasking and leaking of the name(s) is illegal.
Be care what you defend and obfuscate; the shoe can just as easily be put on the other foot.