1979. The Clash. The Winter of Discontent. The SNP handing Margaret Thatcher the keys to Number 10 ... At least, that is how it goes in Scottish Labour demonology. And they’re still going on about it.

At FMQs last week, the Scottish Labour leader Richard Leonard forecast that the Nats will again “put the Tories back in Downing Street”. That is, if Nicola Sturgeon does not announce unconditional support for a Corbyn government. It’s ’79 all over again.

Actually, it was the collapse of Jim Callaghan’s pact with David Steel’s Liberals that led to Labour’s General Election defeat 40 years ago. SNP participation in the March 1979 no-confidence vote, along with the Ulster Unionists and Liberals, merely triggered an election that everyone knew was coming.

So, to say that the SNP put Margaret Thatcher in power would be like saying Labour put Boris Johnson back in power by voting for this December election. The Conservatives are comfortably in the lead in the opinion polls.

Mind you, no-one seems to believe the polls because they got it so wrong in 2017. All the talk is of another hung Parliament. This means we could be in for yet more months, even years, of uncertainty as the two great constitutional issues of this century, Brexit and Scottish independence, collide head on in a Parliament of minorities.

It’s 1979 squared. With an expected 45-50 seats, the SNP may well hold the balance of power after the election. That means the nationalists could determine the future government in Westminster, the future of Brexit and the future of the UK itself.

These are momentous times for the independence movement, and helping Boris Johnson get into Number 10 isn’t part of the plan. Nicola Sturgeon is making clear that, unlike Jo Swinson’s Liberal Democrats, the SNP is ready and willing to do a deal with Jeremy Corbyn.

But she will be no pushover. The SNP leader is demanding not just a referendum on independence, but that a referendum on independence gets priority over any referendum on Brexit.

At least that is what the First Minister appeared to say at FMQs when the Scottish Tory leader, Jackson Carlaw, asked her: “Which would come first?”. She said: “My priority is to give the people of Scotland the opportunity to choose independence next year.”

The SNP will demand that the power to determine the time of the next referendum, the Section 30 order, should be devolved to Holyrood immediately Labour enter office. Since a new Scotland Bill would need to be passed by Westminster, this could take some time. Unionist Labour MPs would oppose it. (Shades of 1979, again, when Labour MPs, led by George Cunningham, slapped the 40% rule on the first devolution referendum).

Indeed, it might never get off the starting blocks, because Jeremy Corbyn’s own priority will surely be to get Labour’s new Brexit deal negotiated with Brussels and put to a “confirmatory” referendum.

Brexit deals tend to take a while to negotiate – two-and-a-half years in the case of the Tory effort. This time it should be easier, say Labour, because they would be agreeing to all the terms previously proposed by Brussels and rejected by the Tories.

Labour would accept the UK remaining in the customs union and staying in “regulatory alignment” with the European Single Market. Plus keeping the level playing field conditions on environment and workers’ rights.

It’ll be done and dusted, Labour say, in three months. Just pop it in the microwave ... er, no that’s Boris Johnson’s line. But it’s true that Brussels might very well fast-track such a deal. However, it still has to get through Parliament.

Len McCluskey, the boss of Unite, has already warned remain-minded Labour frontbenchers not to assume that Labour will support any deal that involves the reintroduction of freedom of movement.

Yet Brussels will insist that this is one of the “four freedoms” and non-negotiable. So already we have a potential logjam. And there will be more. The truth is that Labour is almost as divided over Brexit as the Conservatives.

Many MPs support Brexit, and if Labour get their “Brexit for Jobs” deal with Brussels, they’ll want to campaign for it. But dedicated Labour Remainers, like Brexit spokesman Keir Starmer, say they’ll reject any Brexit deal, however good it is.

And while all this is going on, Nicola Sturgeon will be expecting her Scotland Bill to get fast-tracked through a fractious and divided Westminster. She certainly doesn’t want it to get lost in the mud of yet more Brexit trench warfare, which is why she says it must have “priority” over Brexit so she can call the referendum next year.

But is such an early independence referendum wise? Scottish opinion is split down the middle on independence, and there seems no great enthusiasm for an early Scottish referendum (though most Scots expect one in the next five years). Holding indyref2 before the Brexyref2 raises a number of problems.

First, can Scots make a reasoned decision on Scottish independence before knowing whether or not the UK is remaining in the EU? For some independence supporters, the prospect of Scotland leaving the UK is less attractive if the UK is out of the EU.

Contrariwise, many Scottish voters would be more likely to vote for independence if they were secure in the knowledge that the UK would be remaining in the EU. This would mean there need be no hard border at Carlisle and no regulatory divergence with England.

But I suspect they needn’t worry. Remain Labour MPs will surely move heaven and earth to prevent Jeremy Corbyn agreeing to an early Scottish independence referendum. You see, a Yes vote would mean that Scots would not be voting in the subsequent Brexit referendum, and that would skew the result.

Indeed, Scottish non-participation would make another Leave result almost inevitable.

Then again, if Sturgeon agrees to delay the independence referendum until after the repeat Brexit referendum, that would pose its own problems. A Remain vote would remove the “material change in circumstances” that Sturgeon said was the moral and constitutional justification for a repeat independence referendum.

A Leave vote in the UK would mean that Scotland would be out of Europe and would have to reapply for membership. That could take time. And the Irish border problem moves to the mainland of the UK.

The whole issue makes the head spin. Indeed, this whole sequencing question could be enough to turn voters off the idea of holding any referendums at all. Imagine the divisions over Brexit, with all the legal and political turmoil, being overlaid by another Scottish referendum, in which Scottish voters are even more divided than over Brexit?

It could end up with years of Brexiteers and Scottish nationalists raging at each other, while Westminster sinks into even deeper paralysis.

But don’t worry, it may never happen. There is no obvious compromise between the two positions, and I can’t see Labour agreeing to an early independence referendum before 2021, as Jeremy Corbyn has made clear.

But that leaves us with another even worse thought. We could be facing another General Election in the New Year.