The IRS is immune, the recipients of the illegal information are not immune. They should have to pay back every single dime expended by the pro-family groups to fight the sex fetish crowd.
Would the individual IRS employees be immune if it were shown that their actions were not within the scope of their official duties. Leaking confidential information would likely not be protected activity.