The problem here, though, is inconsistent enforcement. Assuming this side of the story is correct, he didn't actually violate the CoC at all, and the committee he spoke to did.
The problem here is not the CoC, it's that the organisation doesn't enforce the CoC, violates it, and punishes people who didn't violate it. They might as well not have a CoC in that case.