"Be polite all of the time" has certainly been a lot easier to teach my own kids than "only be polite some of the time, because being polite all of the time is a bad thing"
It goes right up there with the philosophy of every thing deserves respect, even the things you don't like.
What I'm saying here is that you're teaching your values, but your values aren't universal. Other parents will teach their values, or simply set examples of behaviors that you disagree with. You can't simply solve the problem by teaching your kids. And if my experience is at all typical, your kid will also pick up values from those other people's kids.
There's no difference between telling children to always be polite to machines and telling children to always beware of foreigners. Both require obedience and shutting off critical insight. You are dehumanizing the world to them. This is why I took the time to write so many responses.