It is by no means obvious that class interests are the same across nations. In many cases, workers in one nation seem to benefit from the impoverishment of workers in another. Today, many blame the decline of the American working class on the outsourcing the jobs to other nations like China.
National loyalties are simply more important than class loyalties, as nations preserve an innately valuable human cultural difference. It is your duty to be loyal to the nation which has shaped your identity.
Suggesting class interests trump any supposed national interests doesn't provide a definition of what a nation is. Many people do feel a strong sense of attachment to "national" communities, something Marxist movements have had to accommodate. In the Austro-Hungarian territories, Marxist parties established separate national wings for the various ethnic groups within the empire to accommodate feelings of cultural difference and argued for cultural autonomy within the movement.