Completely unavoidable. If you live under the boot of colonialism / imperialism, the most immediate and relevant contradiction to people's lives isn't class, it's nationality and race. When both the indigenous elites and non-elites of a colonized area share in the experience of imperial exploitation, that experience forms the basis of a common national identity that positions itself against the extra-national oppressor; that can elide class differences and be reinforced through pre-existing shared language, religion, customs, past polity inclusion, etc.
and apparently unavoidable, which fucking sucks
almost every revolution in the 20th century had a nationalist tinge to it, from cuba, to vietnam, to burkina faso
even 1917 wouldn't have been possible if nationalists hadn't been pissed at the tsar's losses at war (first against japan, then in ww1)
it's at the same time a tool that should be used and a problem that must be avoided
Completely unavoidable. If you live under the boot of colonialism / imperialism, the most immediate and relevant contradiction to people's lives isn't class, it's nationality and race. When both the indigenous elites and non-elites of a colonized area share in the experience of imperial exploitation, that experience forms the basis of a common national identity that positions itself against the extra-national oppressor; that can elide class differences and be reinforced through pre-existing shared language, religion, customs, past polity inclusion, etc.