President Donald Trump is a familiar legislative arsonist. He’ll often throw curveballs at the last minute that give congressional leaders fits — especially in his own party.

But rarely has one of Trump’s late curveballs seemed as ill-advised as the one he threw Wednesday morning.

He suddenly canceled his planned signing of a housing affordability bill that had passed in both chambers with overwhelming bipartisan majorities.

And he added a new twist, saying he wouldn’t sign it until Congress passed the “SAVE America Act.” Some Republicans have cast that election-related legislation as existential, but it doesn’t appear to have any viable path forward.

And Trump didn’t just change his mind; he did so even as the festivities celebrating the housing bill signing had begun. Prominent Republicans were at a press conference espousing the virtues of the bill and touting Trump’s support for it just as he pulled back.