There’s no inherent link between nationalism and monarchy.
Many Welsh and Scottish nationalists are republicans who believe having a monarchy is outdated and illogical.
The nationalism you are talking about is a brand of British nationalism.
An interesting point is that if the monarch ceased to be UK head of state s/he would presumably still remain head of state of another 14 independent countries, which would be awkward.
Another interesting observation imo was Putin’s unexpectedly warm tribute to QE2. Putin has never struck me as someone who highly respects polite international protocol. I suspect he felt able to give his warm tribute because QE2 wasn’t a politician but seen as a neutral figurehead who represented the British people more than the British government.
As someone who believes that there should be absolutely no place for an inherited head of state in an advanced democracy this puts me in a bit of a dilemma.
There is clearly something very attractive about a non-political neutral head of state in international relations, it must surely reduce feelings of bipartisan nationalism, how you achieve that in a democratic society isn’t that obvious to me.
Edit: See also Sinn Fein’s tribute to QE2 as another example of transcending nationalist barriers.