He is against nationalism. But the word “nationalism” is itself not clear, and he does not clarify it, and uses it as synonymous with an anthropological description of primitive (indigenous) tribes. And he is correct to think of primitive tribes as closed societies, meaning that there is total conformity as to mores and beliefs. And this is well illustrated by the example of Socrates who was killed both for corrupting the youth and for impiety. But he is wrong about modern nation-states. Many tolerated both religious and political criticism.
My understanding of “nationalism” (and this may very well be idiosyncratic to me), is that people speaking a common language want to be autonomous. As far as I am concerned this does not require having an independent State — an anarchistic federation of communities will do; though historically people with a common language have formed States. And it is totally puzzling to me why Popper failed to acknowledge this.
His general objections to social and territorial groupings of people is that these matters are vague with borderline cases. This is true, and there is nothing “natural” about this (as he points out); it is conventional. His objection to a demarcation of people by language is that there are dialects. But with the writing of dictionaries there is a sort of crystallization of languages.
I think that Popper, despite acknowledging that States were formed through conquest, thought that they were necessary, and would have arisen nonetheless for other reasons. And I do not see any criticism in Popper of imperial States, including the Austro-Hungarian Empire into which he was born. He would, I think, accept a constitutional monarchy, as long as there existed a mechanism for removing a tyrant from office.
He believed that the function of a State and even of some international institution, like a League of Nations, was to protect individuals — even within States. His view of the role of government in States is made abundantly clear in his discussion and defense of the position of the ancient Sophist, Lycophron (Open Society 1: pp. 114-17).
I think he lamented the disappearance of the Austro-Hungarian Empire. He simply thought that Franz Joseph, Emperor of Austria, did not do a good enough job of protecting minorities in his empire.