Is it racist to mistake someone's nationality?

Accipiter
I've noticed that some people take great offense to being called the wrong ethnicity by another person. For instance a lot of people in the states are very likely to assume any Hispanic they encounter are Mexican. I have some Colombian and Chilean friends who really don't like being called Mexican. Likewise I know plenty of Asians who don't like it when they are all assumed to be Chinese.
But it seems to me that while it's ignorant to assume a person's nationality based on their race, I don't feel it's racist in any way like that.
Is it racist to mistake someone's nationality?
23 Opinion