Republicans have plenty of enemies on Capitol Hill, but it is their friend in the White House who has often been most effective this year at undermining or complicating GOP lawmakers' efforts to make laws.

It's no secret that many senior party officials came around slowly to the prospect of Donald Trump becoming their standard-bearer. But from the time he emerged as the presumptive presidential nominee, right through the general election season and into his turbulent first year in office, they have stood -- in almost every way that matters -- steadfastly by his side.

But with Trump, loyalty tends to run one way , and strategy, such as it is, mostly points to a singular objective: making Trump look good. That in mind, consider the remarkable deal he struck on Wednesday with Democratic leaders, again bucking Congressional Republicans and frustrating their legislative tactics.

1. A surprise debt deal

Republicans wanted to fund relief efforts, but this was not how they planned to go about it.

Congress is now poised to pass a bill that bundles disaster relief with an agreement to raise the debt ceiling and keep the government funded for three months. Some $8 billion in aid to the victims of Hurricane Harvey should be on tap, minus any unnecessary drama. (Especially with another hurricane, Irma, spinning toward Florida.)

Just a few hours earlier, House Speaker Paul Ryan called any potential Democratic effort to tie hurricane funding to the debt ceiling "ridiculous and disgraceful."

Ryan and his colleagues, in the House and Senate, wanted a longer extension, maybe 18 months, that would eliminate any leverage Democrats might have walking into end-of-year negotiations over things like DACA, the border wall, tax reform -- the list goes on.

As one apparently displeased Republican lawmaker told CNN's Lauren Fox , "I mean, he undermined the ability to get a much better deal all around and I don't even think he realized that he did it." A Senate aide suggested Trump had, in one meeting, "killed tax reform."

Incidentally, here's a look at the President and Senate Minority Leader Chuck Schumer during the fateful gathering:

Senate Minority Leader Chuck Schumer and President Trump in the oval office Wednesday. (Photo by Alex Wong/Getty Images)

2. DACA strategery

JUST WATCHED Sessions announces end of DACA program (full) Replay More Videos ... MUST WATCH Sessions announces end of DACA program (full) 10:04

Republicans might be mad about Trump's debt deal team switch, but they shouldn't be surprised.

Trump's decision to end DACA -- or, more accurately, dispatch Attorney General Jeff Sessions to announce the administration was throwing the program into limbo while calling on Congress to hammer out a deal that would protect DACA recipients -- was a long, soaring punt

Ideal? Hardly. But even for Republicans who would have preferred Trump keep the policy in place (or junk it outright), the imposition of an artificial, if strict deadline offered the GOP some room to extract concessions from Democrats desperate to save it. Maybe even free up some cash for Trump's border wall. It was always going to be a narrow path, but as negotiations go, they advantage was theirs.

Then Trump tweeted.

"Congress now has 6 months to legalize DACA (something the Obama Administration was unable to do)," he wrote. "If they can't, I will revisit this issue!"

Congress now has 6 months to legalize DACA (something the Obama Administration was unable to do). If they can't, I will revisit this issue! — Donald J. Trump (@realDonaldTrump) September 6, 2017

His promise to return to the matter gave Democrats a bit of breathing room -- and Trump some wiggle room. Democrats are still in a tough spot, but the tweet will only encourage them to drive a harder bargain.

3. Tax reform takes a back seat

JUST WATCHED Trump threatens shutdown over border wall Replay More Videos ... MUST WATCH Trump threatens shutdown over border wall 01:30

A week after he doubled down on the suggestion that neo-Nazis and protesters were equally at fault for the deadly violence in Charlottesville, Trump jetted out west for a wild rally with supporters in Arizona.

Over the course of a long, digressive and angry speech, Trump all but promised to pardon former Sheriff Joe Arpaio (he'd follow through a few days later as Hurricane Harvey made landfall in Texas) and threatened to shut down the government if Congress didn't fund his southern border wall.

The suggestion was a nonstarter with Republicans on the Hill, who are focused on a variety of agenda items.

"The fact is, though, given the time of year it is and the rest of the appropriations we have to do, we are going to need more time to complete the appropriations process, particularly in the Senate," Ryan said, brushing off Trump's tough talk the next day in Oregon, where he was trying to highlight the tax reform push.

4. The Obamacare shambles

JUST WATCHED Trump admits he called GOP health bill 'mean' Replay More Videos ... MUST WATCH Trump admits he called GOP health bill 'mean' 01:15

Arizona Sen. John McCain ultimately put the long and fruitless Republican push to upend Obamacare out of its misery, but Trump seemed determined to make the process as painful as possible.

He repeatedly urged Republicans to push on, even when it was evident they lacked the votes. In the end, they not only failed but -- like in the case of Nevada Sen. Dean Heller, who is facing a tough re-election fight in 2018 -- were put in the position of either defying the White House or voting for a deeply unpopular bill.

And that's just in the Senate. After a few false starts, House Republicans narrowly passed their version of repeal and replace. Their reward: a Rose Garden photo op with Trump -- so many smiles, so much laughter . At least for a few weeks.

It was revealed in June that he described that same bill, in a meeting with senators, as being "mean." He went further later in the month after former President Barack Obama lashed out at the "fundamental meanness" of the legislation.

"Well, (Obama) actually used my term, 'mean.' That was my term," Trump told "Fox and Friends." "Because I want to see -- and I speak from the heart -- that's what I want to see, I want to see a bill with heart."

5. Firing Comey ... and Russia, generally

JUST WATCHED Trump has a history of teasing information Replay More Videos ... MUST WATCH Trump has a history of teasing information 01:31

Trump has, over and again, shown himself to be either unable or unwilling when Russia election meddling comes up to keep his head down or remain in his corner.

Instead he's repeatedly attacked the investigators, the news media reporting on the potential connections between his campaign and Moscow, and anyone even tangentially involved in the broader mess.

How low has President Obama gone to tapp my phones during the very sacred election process. This is Nixon/Watergate. Bad (or sick) guy! — Donald J. Trump (@realDonaldTrump) March 4, 2017

The sum effect has been to keep congressional Republicans on the back foot. Rather than making the case for any particular piece of pet legislation, they are -- with apparent frustration -- constantly trying to make sense and, in some cases, excuses for the President.

Trump's decision to sack former FBI Director James Comey set off a chain of events that led to the appointment of a special prosecutor. Any plans GOP leaders running the House and Senate might have had to water down or fast track their own probes died right there.

And a decision by Robert Mueller, whose investigation continues apace, to recommend charges against anyone in Trump's inner circle could set off a broader crisis — one that would instantly derail increasingly unlikely bids for tax reform or a border wall.