The second not fitting is is more nuanced. You've been there for a while, you know your way around but people insist on treating you like a foreigner. This for example happens to A. a lot in Europe or even in the US where being brown is not the norm and people assume you don't know how things work. This is also how I think it would be if I lived in India for a while: I would know the basics but people would still act as if I didn't.
And finally there is the third not fitting in type which can be quite amusing or exasperating in same measures. This happens when you just arrived at a place, don't know anything but seem to fit right in (at least others assume so). This first happened when I moved to the US and although I spoke English I could just not understand the strong Southern accept people had. This annoyed people considerably, since they thought I was making fun of them. Another example is A. in Brazil where by looks he fits right in... he even had a woman ask him at a dollar store if he worked there! He was pissed off but I told him to take it as a compliment. And finally, this is what is happening to me here in Norway. People seem to single me out on the street, come straight to me and start speaking Norwegian (asking for what I think are directions). When I answer that I don't speak Norwegian there is usually a "oh" and then they switch to English or just walk off.
Although not fitting in is not necessarily bad... Like I was shocked when I found myself suddenly fitting into the US car culture after biking around for 4 years!