You are correct about the letter of the law. The Supreme Court disagreed in Citizens United v. FEC and ruled that the government cannot restrain corporations from making independent expenditures for political campaigns. It definitely applies to 501c4 orgs, as Citizens United itself is one!