It's a tricky one. Every culture cracks jokes about how funny the other chap sounds / looks / acts, without meaning anything malicious about it. It's just in-group banter and doesn't necessarily mean that the other fellow is viewed as inferior, just
different. It's really a way of celebrating that the local culture, mores and speech are - of course - correct and exceptional, which is something that all strong, stable cultures inculcate. A culture that doesn't do that, which tell itself "You know, maybe those Huns and Visigoths at the gates have some good points, let's invite them in and see.", is on the way out. [Sinister foreshadowing intensifies]
I've visited and worked in many places, and while the local professionals have always been polite and courteous, there's never been any doubt that I was the kuffar, gaijin or mat salleh. I have no doubt at all that they were laughing about my hilariously awful pronunciation and clumsy, childish table manners the moment I was out of earshot. It's not something to take any offence over, because after all,
I know that speaking the Queen's English around a mouthful of deep fried haggis being eaten with a knife and fork is the zenith of human civilisation, right?