Robert Rogers: Arguably the most important person in this picture (he

Bercow v Cameron: The backroom dealings behind their latest Commons clash

Bercow v Cameron: The backroom dealings behind their latest Commons clash

It takes a lot for the prime minister to find himself obliged to pull a funny face. Yet in the Commons this afternoon a jibe from Speaker John Bercow prompted David Cameron to stick his lips out, raise his eyebrows and wobble his chin around, like a drunk Scotsman conceding a minor point.

The sore spot being prodded by Bercow was a point of parliamentary nitty-gritty relating to this Friday's EU referendum bill.

Tory backbencher James Wharton will bring his private member's bill to the floor of the Commons at the end of the week in what is set to be an occasion variously described as "strange", "weird" and "bizarre" by parliamentary insiders.

The Conservative party, frustrated by life in coalition, has not been able to bring the bill forward in government time. Those pesky Liberal Democrats simply wouldn't allow it, it was assumed, so the Tories will attempt to seek to legislate via what Labour MP Gisela Stuart today called the "good offices" of the Conservative backbenches.

Stuart's question to Cameron focused on whether he had mentioned the awkward nature of the private member's bill to eurocrats in Brussels last week. Cameron simply laughed her query off, saying he "didn't explain all the nuances we have of parliamentary procedure". On sitting down, Bercow took the opportunity to butt in.

"Given that ministers were originally proposing to have their names on the private members' bill, it's probably just as well that the prime minister wasn't proposing to explain the intricacies of parliamentary procedure," he said. The second half of this comment came close to being drowned out by hoots of amusement from all sides of the chamber, while Cameron indulged in his chin-wobbling routine.

If it hadn't been for his redder-than-average complexion, the drunk Scotsman simile might have been replaced with a comparison to a juvenile going "meh-meh-meh!" at a nagging parent. The prime minister was not, at that moment, a particularly happy man.

It appears his grumpy reaction was justified – despite Bercow's comments indicating that, somewhere behind the scenes in parliament, government authorities had come close to making a terrible mess-up of the bill.

The procedural head-scratching behind all this took place about ten days ago, I've been told. Wharton had approached the prime minister and foreign secretary asking them to put their names down in support of the bill. This is fairly typical for the Commons; usually politicians put their names down to support a motion, for example, and it's exactly the same with pieces of legislation.

Only, actually, this was not just slightly different. It was very different. Never before in the many centuries of parliament has a government minister attempted to put their name down in support of a piece of private business. It was a completely unprecedented move.

They obviously didn't realise it, but the Tory business managers in the Commons were close to walking into an ambush. The rules of the game appear to suggest that if a government minister puts his or her name to a piece of legislation, that legislation is transformed from an ugly private member's bill into a prince of a government bill. This meant – we go even deeper and deeper into the fairytale abyss – any Europhile Liberal Democrat minister/evil stepmpther opposed to the legislation would be able to wave their procedural magic wand and remove it from being debated altogether.

What a conundrum for the Speaker, to whom the matter was put for a ruling. After pondering it carefully, and no doubt consulting the clerk of the House Robert Rogers, he judged that to keep the differentiation between private member's bills and government bills it would be for the best if the prime minister and foreign secretary did not sign it, after all.

Hence today's remark from the Speaker. The "intricacies of parliamentary procedure", he was very glibly observing, were obviously a bit much for the government to cope with. Cameron's contempt for Bercow might have rapidly become a little more obvious than usual, but everyone has their limits.

Meanwhile, this Friday's debate rolls ever closer. The current frontline of negotiations between the parties is now over whether William Hague will be able to speak on the issue from the despatch box – and whether he will be able to divest himself of the usual constraints of collective responsibility while doing so. The expectation is the Lib Dems will agree to this – a government minister of some shape has to speak in the debate, after all. But it just goes to show how strange this Friday's debate is that even details like this are causing some in the Palace of Westminster to scratch their heads – and pull ridiculous facial expressions.