In the aftermath of a far-reaching California Supreme Court decision regarding worker classification, state lawmakers are poised to fail one of the most basic tests of good governance: the equal application of the law.

Instead of fixing a ruling that threatens the gig economy as well as many, more established industries, the Legislature is working on carve-outs for politically connected industries. This is the wrong approach.

Last year, the California Supreme Court turned decades of state labor law on its head by redefining the test for what constitutes an employee versus an independent contractor. Under the court’s decision in Dynamex v. Superior Court of Los Angeles, workers are presumed to be employees for wage-order purposes unless firms can prove that: A) the worker is outside the firm’s control; B) the worker is performing a task that is outside the firm’s normal scope of business; and C) the worker has decided to go into business for him- or herself.

Known as the “ABC Test,” the court’s language is so broad that is has the potential to cause hundreds of thousands of workers to be reclassified as employees, a prospect that could create billions in economic costs for state businesses. Now, under Assembly Bill 5, state lawmakers are trying to codify the ABC Test into law based on the theory that many workers are “misclassified” as independent contractors instead of employees entitled to the full suite of worker benefits and protections.

These efforts seem targeted at the so-called gig economy — in other words, app-based platforms that use drivers, deliverers and other contractors to perform tasks for customers. In reality, the ABC Test would ensnare a broad swath of industries that have long operated under an independent contracting model, ranging from emergency room doctors to exotic dancers.

Specifically, the ABC Test’s requirement that independent contractors perform a task outside a firm’s normal scope of business could prevent realtors, insurance agents, truck drivers, construction workers, hairdressers and even freelance journalists from claiming independent contractor status. The prospect of upending long-accepted workplace models — as well as newer, more innovative ones — has triggered a backlash among many businesses and workers who prefer the flexibility of the contracting system.

Rather than acknowledging that the ABC test is problematic, however, California politicians pushing for its codification have increasingly taken the tack of denying the breadth of the test or coyly suggesting that certain industries could be exempted from its reach.

For instance, at an informational hearing in front of the state Legislature this month, both lawmakers and witnesses suggested that the state labor code’s already-existing Professional Exemption would continue to allow those in occupations like doctors, engineers, architects and artists to be independent contractors under the theory that these types of professional workers have more bargaining power and less need for employee benefits.

Exemptions to the ABC Test would likely go much further if the test is codified. When asked whether freelance journalists might no longer qualify for independent contractor status — something that could harm an already-struggling journalism industry — California Assemblywoman Lorena Gonzalez-Fletcher, D-San Diego, stated she was “not sure the case fits freelancers” before suggesting that they, too, could simply be exempted.

State labor representatives have also started hedging, claiming that “conversations” are needed about exemptions for hand-picked industries. Gonzalez-Fletcher has openly acknowledged that lawmakers are “meeting with countless industries” about carve outs and that “[e]verybody is lobbying for an exemption.” This type of government by exemption gives credence to critics who suspect that the legislation is a union-backed effort to quash competition.

The debate creates uncertainty for well-meaning California businesses, which already are struggling with one of the nation’s toughest regulatory climates. The best solution might be a “third-way” status that creates a new category of worker. In the meantime, Californians should insist that their Legislature step up and fix a complicated problem — rather than merely exempting those industries with the most clout in the Capitol. That’s lawmaking 101.

C. Jarrett Dieterle is the director of commercial freedom at the R Street Institute, a free-market think tank in Washington, D.C. Steven Greenhut is R Street’s Sacramento-based western region director.