WASHINGTON — Republicans are moving their tax bill toward final passage at stunning speed, blowing past Democrats before they’ve had time to fully mobilize against it but leaving the measure vulnerable to the type of expensive problems already popping up in their massive and complex plan.

Questionable special-interest provisions have been stuffed in along the way, out of public view and in some cases literally in the dead of night. Drafting errors by exhausted staff are cropping up in need of fixes, which must be tackled by congressional negotiators working to reconcile competing versions of the legislation passed separately by the House and the Senate.

And the melding process underway has opened the door to another frenzy of eleventh-hour lobbying as special interests, including President Trump’s rich friends, make one last dash for cash before the final bill speeds through both chambers of Congress and onto Trump’s desk. Passage is expected the week before Christmas.

Veterans of congressional tax overhauls, particularly the seminal revamp under President Ronald Reagan in 1986, have been stunned and in some cases outraged at how swiftly Republicans are moving on legislation that touches every corner of the economy and all Americans. And although Republican leaders make no apologies, some in their rank and file say that the process would have benefited from a more deliberate and open approach.

“I think it would have looked better if we had taken more time and had more transparency, had more open committee hearings,” said freshman Rep. James Comer, R-Ky. “Having said that, the goal that everybody had was to reduce the tax rates. … So at the end of the day the goal is going to be achieved, but we could have done it in a more transparent manner that probably would have given the voters that are being polled a little more confidence,” Comer said, referring to the effort’s poor showing in opinion surveys.

It has been just more than a month since the $1.5 trillion legislation was introduced in the House, and in that short time it has cleared the two key committees in the House and Senate and won approval on the floors of both chambers, all without a single Democratic vote. If Trump signs the bill as planned before Christmas, that would mean a journey of less than two months between introduction and final passage.

The specific legislation that probably will become law, sold as a middle-class tax cut but featuring a massive corporate rate reduction at its center, is moving from release toward passage without any hearings, unusual for a bill of such magnitude. And as it tumbled along it picked up some startling new features, to the surprise of affected industries, Democrats and in some cases Republicans themselves.

Some of the most notable changes came in the hours preceding the Senate’s passage of its version of the bill, which happened about 1:50 a.m. Dec. 2.

The final vote was preceded by hours of inaction as Republicans fine-tuned their legislation behind closed doors, while fuming Democratic staffers ate Chinese food and poured over versions of the bill and lists of amendments that had been leaked by lobbyists on K Street before Republicans had made anything public.

As they got additional drafts of the bill, Democrats were incensed at some of what they found, including new breaks for the oil and gas industry, and a provision that appeared aimed specifically at helping Hillsdale College, a small liberal arts college in Michigan that doesn’t accept federal funding and has a large endowment funded by wealthy conservatives including the family of Education Secretary Betsy DeVos.

An angry Bernie Sanders, I-Vt., stood on the Senate floor to declare that “the federal treasury is being looted.” In their one victory of the debate, Democrats offered an amendment to strike the Hillsdale provision, and with the help of four Republicans it passed.

Democrats weren’t the only ones surprised by what was in the bill. Republicans and the business community were stunned when the final Senate version restored the alternative minimum tax for corporations. The tax, aimed at keeping companies from shirking their tax duties entirely, had been repealed in the House bill and earlier versions of the Senate measure.

Restoring the corporate alternative minimum tax created $40 billion in revenue for the bill, which helped Republicans come in under complex budgetary guidelines saying the legislation can’t go over the $1.5 trillion the Republican Party has agreed to add to the deficit over the next decade. Still, some Republicans professed not to know how the change had come about.

And under the new tax code the Republican bill would create, including the alternative minimum tax could have the unintended consequence of preventing companies from using other deductions, including the popular research and development tax credit.

“I’m guessing they just needed something quick to make the bill work,” said Rep. Devin Nunes, R-Calif., who is one of the conferees charged with blending the two bills together.

Now, as quickly as it reappeared, the corporate alternative minimum tax probably will disappear again. Republican lawmakers widely agree that it doesn’t work and can’t be included, but it remains a mystery where they’ll find revenue to offset that change and pay for others they’re looking to include in the final package.

There has been discussion of moving the corporate rate to 22 percent, but the backlash against that proposal has been intense, and it probably will be dropped. But revenue must be found somewhere because there are some changes that look nearly certain, including adjusting the new limit on deducting state and local taxes. Both the House and Senate legislation would allow taxpayers to only deduct up to $10,000 in property taxes. Some of Trump’s New York friends have taken exception to that provision and have lobbied the president personally against it.

It’s all part of a breakneck pace of the tax bill that contrasts with the nearly a year-and-a-half that passed between when Reagan unveiled his initial version of the 1986 tax plan and its ultimate passage into law. The less far-ranging tax cuts that President George W. Bush signed in 2001 took four months to become law after the release of Bush’s initial blueprint. And the Affordable Care Act took nearly a year to complete, including a congressional summer recess featuring angry town hall meetings that turned public sentiment sharply against the bill.

Democrats accuse Republicans of whisking the legislation along to avoid extended public scrutiny and prevent them from mounting an offensive at public hearings or over lengthy congressional breaks. The Republican bills have endured neither.

“It’s clear that we could have defeated this bill had we gone through regular order and had any expert witness from any blue state or high-tax state come in,” said Rep. John B. Larson, D-Conn., who was a member of Democratic leadership during the much lengthier and more open process of passing the ACA. The provision limiting taxpayers’ ability to deduct state and local taxes hits high-tax areas like California, New York, New Jersey and Larson, Connecticut, particularly hard.

“People would have said ‘Well wait a minute,’ ” Larson said.

Republican congressional leaders dispute such comparisons, saying that the process on taxes has been going on for years, given that the party has long been debating the idea and an early foundational bill was released by then-Rep. Dave Camp, R-Mich., former chairman of the tax-writing Ways and Means Committee, nearly four years ago. House Republicans led by Speaker Paul Ryan, R-Wis., also campaigned last year on an agenda called Better Way agenda, which featured a tax plank similar in many respects to the bill the House ultimately passed, though it drew scant attention at the time.

“These are relatively small bills, 400 pages or so; they’re not hard to digest. The policy decisions, the thoughtfulness, a lot of these issues we’ve been debating together and apart for years,” said House Ways and Means Chairman Kevin Brady, R-Texas. “Bottom line is the American people have been waiting 30 years. So to paraphrase a hardware store: less talking, more doing.”

Even before the late-night Senate dramatics, the process offered surprises and sudden twists.

A provision repealing an Affordable Care Act requirement for most Americans to carry insurance or pay fines was added to the Senate bill with little warning over the course of an afternoon, a major health policy decision that is projected to leave 13 million more Americans uninsured in a decade but that would give Republicans $330 billion to pay for other things they want to do.

And the release of the House bill stunned manufacturers when they discovered it contained an “excise tax” on purchases from American companies’ foreign subsidiaries that some said could drive them out of business. The provision was watered down before passage by the Ways and Means Committee, but companies are still fighting to keep it out of the final bill, said Nancy McLernon, president of the Organization for International Investment, which represents global companies with U.S. operations. Despite the years-long focus on tax overhaul, such a provision had not been debated – even after companies beat back a different import tax, she said.

The Senate has a different provision that companies like better, but as far as the cost of going from one to the other or how it will all shake out, “It’s all a Rubik’s cube,” McLernon said.

Many lobbyists, Democrats and other observers expect to find the final version of the bill, which could be filed late this week, just as full of surprises as the various iterations that have appeared. But as they gun for a legislative win that has eluded them this year, Republicans show little interest in slowing down to take a closer look.

“The frenzy, and I would call it a frenzy, to get it done and have a Christmas present for America – number one, I think it’s unnecessary; it’s a self-imposed deadline, and number two, it makes the possibility for error much greater,” said Steve Bell, a senior adviser at the Bipartisan Policy Center who was staff director of the Senate Budget Committee during the 1986 tax effort. “This is a rush without a reason other than the political desire for a Rose Garden signing ceremony.”