Should Republicans' efforts to repeal and replace Obamacare fail, it may alter their tax reform agenda.

If President Trump can't close the deal and bring together a factionalized Republican Party on their marquee promise of the past 7 years, it probably won't bode well for the rest of his and Republicans' legislative agenda, according to some experts.

"The defeat of health care reconciliation threatens to derail the entire Trump economic plan. Period. The balkanization of the GOP will continue. And Trump becomes an anchor around some GOP incumbents' necks," said longtime Senate Budget senior staffer Steve Bell, now an economic policy advisor at the Bipartisan Policy Center.

But there are others who say that such a failure will actually spur Republicans to change the channel to tax reform ... and fast.

"If you deliver the president a loss on his first major legislative effort, there probably will be a lot of impetus to get moving on another big thing. [Republicans] won't want to sit around and sulk," said Gordon Gray, also a former Senate budget staffer who is director of fiscal policy at the center-right American Action Forum.

If Obamacare repeal fails and Republicans do press ahead on the tax front, they'll do so with very sobered expectations as to what they can accomplish, said Dean Zerbe, former senior counsel to the Senate Finance Committee chairman and currently national managing director at alliantgroup.

"It will all be more modest," Zerbe said -- noting for instance, there would be lower tax rates, just not nearly as low as promised.

Related: 6 reasons tax reform may not happen this year

As it is, both lawmakers and Wall Street have been overly optimistic about what can be accomplished this year on the tax front.

They're underestimating how long it will take to get real buy-in from key players on something as complex as tax reform. And they've disregarded the difficulty of getting agreement on a key question: Should the cost of the the tax cuts in a reform package be paid for with tax increases elsewhere, and if so, where?

At this point, Zerbe can see Republicans opting for a package of tax cuts and other changes that add a trillion dollars or two to deficits in the first decade.

While the word "reform" might be used it won't be a full overhaul of the tax system.

If a health bill doesn't pass, Republicans could also push to include the repeal of some big Obamacare taxes as part of a tax package. If they do, lawmakers would have to offset them primarily with other tax increases or general revenue raisers, not with spending cuts as they could if the measures were included in Obamacare repeal, according to Gray.

"The more you have to make up with revenue, the more enemies you'll make," Gray said.

Of course, Republicans will also rely on so-called dynamic scoring to help make any package of tax cuts look less costly. Dynamic scoring assumes tax cuts will generate some economic growth. That growth in turn will generate revenue and that can partly offset the loss of revenue from a tax cut.

Just how much growth they might generate is something the Congressional Budget Office will have to estimate. But no expert believes tax cuts can pay for themselves in full.