You seem to be saying that if Plame or some other person whose cover is blown is in fact a covert agent, then the referral could not be made, because the CIA would not want to blow the agent's cover all the more. But that's a prudential matter to be borne in mind in deciding whether to make the referral. The implication of what you seem to be saying would appear to be that, wherever the CIA has reason to believe the statute has been violated, it cannot make the referral. I think that's absurd.
You are using the referral as an indictment and that is where your logic is deeply flawed.
In this case, the only confusion seems to be whether or not Mrs. Wilson was or wasn't a covert agent at the time of the revelation, or whether she was or wasn't handling covert operations. Even though the CIA knows her status (and CIA officials told Novak she was an analyst), they are still likely to refer the matter to an independent third party for investigation. If they didn't refer it to a third party, two things will happen: they will be accused covering up or they will be accused of leaving one of their employees (analyst, agent, opertative, whatever...) "out in the cold".
No matter which way, they will be taking heat. So, referring it to the DOJ takes that contingency out of play.
In this particular case, the CIA should be extra motivated to get itself out of an investigation or being the investigative body, because (rightly or wrongly) someone in the agency confirmed that Mr. Wilson's wife work for the CIA. They even confirmed her name, but requested that Novak not include it. Journalistically, the woman's name was researchable, so the proverbial "cat was out of the bag".
Again, the CIA, as involved party to the story/situation, would (rightly) refer it to a third party, which in this case is the DOJ. The DOJ referred the case, as it often does, to the FBI and they will conduct the investigation.