Doing a good job on something that someone else will get credit for is crazy. If you do a bad job, that might get back to you. My suggestion is find the point where its not good enough or bad enough to get mention.
Sadly I fell prey of being offended by comment at work the other day... Only the coworker mentioned in a meeting that no one was as good or as fast as a particular individual at a certain task... I've been irritated because I do her work and keep getting stomped on.
@Danopia:
Wally is a bastion of rationality! His whole existence and behavior is a living, breathing proof of rationality! If Dilbert was being sarcastic I'd give him my fist of death.