I feel bad for the op, because I can understand exactly how he feels. I've experienced this type of treatment on more than one occasion among acquaintances in and above my age group, late 20s and up.
In reality it has little to do with any conscious racial bias and more to do with ignorance. I've heard the same excuses again and again about how China was forced to bend to the will of foreign colonial powers, forced to suffer humiliating defeats, allow areas of their country to be annexed, etc. The most amazing part of this entire argument is that it really doesn't prove anything! China is not special in this context, and arguably (aside from a few well-known horrific incidents) made out pretty well in the end with a global financial center and an incredible network of production and transportation infrastructure built by the Japanese.
It's really just a scapegoat the Chinese use depending on the context of the argument. In a lot of cases you see one of two things happen when discussing anything of global significance with some Chinese (note I am not making a blanket statement about all of them). "We have 5,000 years of history and culture, so you should listen to us. We know what we're talking about." This is usually used to dismiss nearly anything an outsider mentions, regardless of whether it's "correct" by any standard of logic or not. The second is, "We've only been developing for 30 years, so you shouldn't expect so much from us," which is essentially used to excuse blatant xenophobia, disturbing social trends and official abuses...the list goes on and on.
It's really quite interesting that the op mentions his Chinese should be considered to be upper-intermediate. You would think that this would be welcomed, but I've had experience that says otherwise. When you just get to China and can't wrap your head around tones, can't form a cogent sentence, and essentially blabber like a fool the Chinese will tell you, "Ni de Zhongwen shuo de hen hao," or something similar. A nice gesture to say the least, but I haven't figured out whether it's genuinely meant to make you feel more at ease or a bit of a jab. I guess it depends on who's making the statement!
However, once your Chinese gets to a point that it could be called "fluent," or "really good" things start to change dramatically. Add that to being a westerner with a good grasp of any local dialect and it changes even more. You find that the compliments don't seem to come as often and when you're among them they seem to be far more cautious about what they say.
You know too much! They don't want you to always be around because they know that you're going to catch everything they talk about, and for some reason they have some sort of instinctual need to have their secrets and be able to speak freely without having some westerner listening in. It's just a characteristic of a group of people that have been isolated for so long that it's difficult for them to accept.
Granted with a lot of young people it seems to be getting a lot better, but there are disturbing trends as well. I've found that middle-aged Chinese tend to be far more accepting of us and more interested in learning new things. The education system has done well to encourage the young to harbor illogical resentment against outsiders and instill a sense of superiority even as the vast majority with financial means run to Australia or Canada as fast as they can.
The coolest thing to do is to show them WHY they can like you. Chat with them in your courtyards or when you run into them on the street. Bring them some fruit or small gift and show the effort to create what could be a great friendship. You may even find this kid's mother is actually a cool person, if only a bit misled. It's worth a shot!