Today’s High Court ruling on the meaning of Labour’s leadership election rules shows why Jeremy Corbyn didn’t want to stand down after the no confidence vote. Essentially, as predicted, the court interpreted the rulebook to mean that only challengers, not the incumbent, must pass a threshold of MP nominations to make it onto the ballot paper.

It’s most likely a product of poor drafting – those who wrote the rules don’t seem to have imagined any Labour leader staying stubbornly in the job with the support of only a tiny proportion of the Parliamentary Labour Party. They assumed any leader would be sufficiently practical, or sufficiently reasonable, not to end up in that situation. In short: they never imagined Corbyn.

But the rules are the rules, whether the Party or its MPs like it or not. And there are few things the Hard Left like more than a rulebook, with its numerous loopholes and opportunities to produce political advantages even for a cause which is seemingly hopeless. Given their close study of the process, it’s no wonder Corbyn wasn’t willing to resign in the face of opposition from the PLP: to do so would not just be to betray the sacred mandate, but it would likely allow the MPs to lock anyone so extreme out of the leadership race forever, having learned the lesson of their ill-judged generosity last summer.

For the same reason, it’s in Corbyn’s interests to continue in the job for as long as possible – or at least until he has managed to change the rules to make future leadership races more easily accessible to people who agree with him.

I’m far from convinced that he would even resign after a crushing General Election defeat. If May were to call a snap election in the next few months, the Corbynites would simply blame their performance on the Red Tory Blairite splitters who had dared rebel against Jeremy. If they really believe it, and they will, why would they ever believe their man should take responsibility and lose his job? No, it would instead have demonstrated the need for him not only to carry on but to redouble his efforts to change every part of Labour.

And there’s the second reason why I can see Corbyn carrying on even in defeat. While the last ten months have been his opportunity to change his party’s leadership, and Owen Smith has given him the opportunity to still further change its membership, an election defeat would offer him the opportunity to change its MPs. No doubt he’d rather storm to victory sooner rather than later, but there’s no denying that a clear-out of dozens of the most awkward MPs would offer him and Momentum the chance to ensure more Corbynites are selected as candidates the next time round.

If that sounds like a long game, it should be no surprise. The hard left have always been willing to bide their time – it isn’t called “the long march through the institutions” for nothing.