I wonder what was going through David Cameron's mind as he cleared his diary to rush off to the funeral of King Abdullah of Saudi Arabia. (I'm not too bothered about what went through Prince Charles's mind - going to foreign funerals is what he's paid for.)
By most people's standards, the Saudi monarch was a brutal tyrant. Or, if we're feeling generous, he presided over a tyrannical regime. If he was, as so many commentators insisted, a reformer at heart, he was a remarkably unsuccessful one.
I understand the need for diplomatic niceties to be observed. That's why when a royal head of state dies, I'm perfectly happy for one of our royals to attend the funeral. But why on earth do we have to send the prime minister as well?
Perhaps you think it's because we still need their oil. Well, no, in fact - only 4% of the UK's imported oil comes from Saudi Arabia - most of it comes from Norway (42%), Algeria (14%) and Nigeria (13%).
No. The real answer is that the Saudis buy obscene quantities of UK armaments. So British policy towards Saudi Arabia can best be represented by a single symbol: a great big dollar sign. Moreover, in a region that becomes ever more violent and unstable (Iraq, Syria, Yemen, Egypt, Libya, Lebanon), Saudi Arabia appears - repeat appears - to be a rare island of relative tranquillity. These days, for Western leaders worried about where the next jihadi outrage will strike, that's worth a lot.
It is also woefully short-sighted. Because the truth is that the motivating ideology that infects the jihadi killers on the streets of Europe's capitals comes directly from the very same city where Mr Cameron, Prince Charles and the rest of them congregated to pay their respects to the departed Saudi monarch.
My heart sinks as I write the word "respects". Respects to an absolute monarch in a kingdom that publicly beheads miscreants, publicly flogs bloggers, and still forbids women from driving or travelling without the permission of a male guardian? Does realpolitik know no boundaries at all? Would they genuflect to Kim Jong-un of North Korea as well if he bought enough of our weapons?
There are nearly as many strands in Islam as there are in Christianity. Most of them pose no greater threat to non-Muslims than the Quakers do to non-Christians. But it is the world's great misfortune that the strand espoused by the richest and most reactionary rulers in the Muslim world is also the most ruthlessly exported. Visit almost any country on earth where there are Muslims and there you will find mosques built and financed by Saudi cash.
These days, the Saudis profess to be as worried about jihadi murderers as everyone else, but whether that anxiety is matched by effective action against the propagandists, financiers and others who back the most extreme elements in Syria, Iraq and elsewhere remains open to doubt.
What is not in doubt is that the Saudi royals are deeply concerned at the spread of Iranian-backed Shi'ism in the region - and even more concerned at the prospect of Iran finally doing a deal over its nuclear research programme and being re-admitted into what we fondly refer to as the "international community". The Saudis have always regarded themselves as the rightful rulers of the whole of the Islamic world; after all, their country is where the prophet Mohammad was born and lived, and where their religion was created. Iran, and Shi'ism, which Saudi clerics regard much as Pope Leo X regarded Martin Luther in the 16th century, threaten Saudi hegemony.
President Obama, who was accompanied in Riyadh by Mrs Obama and a host of US dignatories, wants to keep the Saudis onside. No one in Washington has forgotten, or will ever forget, that 15 of the 19 hijackers on 11 September 2001 came from Saudi Arabia.
And if you've been following the entirely specious "row" over why Mrs Obama didn't cover her head during their visit (a wonderful demonstration of feminist courage, according to her supporters; a disgraceful demonstration of disrespect to a key ally, according to her Republican critics), you may be interested to know that she was in good company. On previous visits to the desert kingdom, former First Lady Laura Bush, ex-secretary of state Hillary Clinton, and German chancellor Angela Merkel have all appeared bare-headed.
I've even come across a 30-year-old photo of then prime minister Margaret Thatcher, also bare-headed on a visit to Saudi. And she wasn't exactly one of the world's most outspoken feminists, or one to disrespect a valued ally, especially as it was she who signed the UK's most lucrative arms contract ever with the Saudis: the al-Yamamah deal, worth something like £40 billion to the British defence firm BAE.
The Saudi royal family are not the kind of people we should be doing business with. The only reason to stay on speaking terms with them is that if they are overthrown, they could well be followed by something even worse.
Still, wouldn't it be nice if, like Germany, we could halt our arms sales to what is undoubtedly one of the nastiest regimes on the planet. And when the new king dies - he's already 79 - perhaps we could send Prince Charles on his own. I'm sure he'd manage just fine.