Whist there is some truth to this, how far do you take it?
When you have a dexterity fighter whose one trick is to shoot things with arrows do you have an encounter immune to piecing damage?
How about a barbarian whose one trick is to hit things with an axe?
I am not saying you should go out of your way to avoid these, but some features are pretty important and are likely to be why someone played a class. Challenging them is fine, but doing it in such a way that it sucks the fun out of the experience isn't.