When Jacob Lavoro, a 19-year-old from Round Rock, Texas, learned that he could go to prison for the rest of his life over a pound and a half of cannabis-infused brownies and cookies, he was surprised. So were his father, his lawyer, and, judging from the plentiful press coverage, many other people. How could baked goods that are legally sold in Colorado (and soon in Washington) trigger a sentence of 10 years to life in Texas?

As Mark Brunner, first assistant district attorney for Williamson County, which is prosecuting Lavoro, explained last week, the jaw-dropping penalties the teenager faces illustrate how one kind of prohibitionist idiocy compounds another (although that is not quite the way Brunner put it). First, Texas law treats drug offenses involving "resinous extractives of cannabis" much more severely than offenses involving marijuana buds. Second, when calculating drug weight, Texas, like many other states, includes "adulterants and dilutants."

Lavoro was arrested in April after police found 1.4 pounds of hash brownies and cookies in his apartment. They also found some additional hash oil and marijuana, but the baked goods alone were enough to make him guilty of a first-degree felony.

Under Texas law, possessing more than 400 grams (about 14 ounces) of cannabis concentrate is punishable by a minimum sentence of 10 years and a maximum sentence of life. By comparison, the sentence for possessing the same amount of marijuana is six months to two years. In other words, the minimum sentence for cannabis concentrate is 20 times the minimum punishment for marijuana.

The rationale for punishing offenses involving extracts more severely is that extracts are more potent. But the typical difference in THC levels between concentrates and buds is nothing like 20 to 1. While the THC content of hashish (cannabis resin) can be as high as 70 percent, the federal government's Marijuana Potency Monitoring Project reported that the average THC content of hashish seized in 2008 was 23 percent. Likewise, hash oil, which is more concentrated, may contain as much as 90 percent THC, but hash oil seized by the government in 2008 averaged just 6.5 percent (down from almost 25 percent the previous year). By comparison, the average THC content of high-quality marijuana seized that year was 11.5 percent, and some super-strong strains exceed 20 percent. The THC numbers from seizures are not necessarily representative, and they vary widely from year to year. Still, it's clear that any given batch of hash or hash oil might be about as potent as a bag of buds, or even weaker. But Texas will still treat it as 20 times as bad.

It gets worse. Lavoro did not have anywhere near 14 ounces of hash oil, the cutoff for the 10-year minimum sentence. But because he mixed hash oil into brownie and cookie batter, the weight of the baked goods was counted too. Brunner, the prosecutor, explains: "If I take 1 gram of hash oil and mix it (dilute it) into 500 grams of brownie mix, eggs, water, vegetable oil, etc., I now have 501 grams of a controlled substance. Not 1 gram, but 501 grams. I have taken a low-level felony and made it into a first-degree felony."

Unlike Texas's unusually harsh hash penalties, the practice of treating any mixture containing a drug as if it consisted entirely of that drug is quite common. It makes life easier for police and prosecutors, who can pretend that a kilogram of cocaine is a kilogram of cocaine, no matter how diluted it is. But that approach can result in spectacularly unjust outcomes, especially in cases involving LSD, a highly potent drug that weighs much less than the "carrier" containing it. Under federal law, distributing 10 grams or more of LSD (or possessing that amount with intent to distribute) is subject to a mandatory minimum sentence of 10 years for a first offense, 20 years for a second offense, and life for a third offense. Since doses of LSD typically range between 50 and 100 micrograms, 10 grams of pure LSD would be a lot—something like 100,000 doses. But since the weight of the carrier is included, all you need to get 10 years (or more) is a few sheets of blotter paper, each containing any detectable amount of LSD. If you were old-fashioned enough to use sugar cubes, three doses would be enough to trigger the mandatory minimum.

The same sort of weird weight-based logic is at work in Lavoro's case. A pound and a half is a lot of hash oil, but it's just one batch of hash brownies. Texas law nevertheless treats the two as one and the same. Even crazier, because of the distinction between cannabis and cannabis extracts, Lavoro could have made equally potent brownies with buds, and he would be facing a minimum of six months instead of 10 years. Even the most enthusiastic pot prohibitionist would have to concede that such disparate treatment makes no sense.

There may be a way out for Lavoro. While the minimum term if he is sentenced to prison would be 10 years, first-degree felons sometimes get probation in Texas. According to Brunner, a defendant in Lavoro's position "may be eligible for a term of community supervision (probation) not to exceed ten years." A couple of years ago, the singer Fiona Apple was busted in Sierra Blanca, Texas, with enough hash (four grams) to trigger a prison sentence of two to 10 years. Yet the only time she served was a night in jail after her arrest. Although Lavoro is not quite as famous, maybe he can work out a similar deal.

However things turn out for Lavoro, his predicament illustrates the extremes to which politicians can be driven by a blind, unreasoning hatred of psychoactive substances. To put anyone in prison for baking cookies that make people giggle—whether the sentence is one year, 10 years, or life—is beyond absurd, especially now that Americans can openly buy such treats from state-licensed stores elsewhere in the country. At some point this sort of confusing contrast has to make prohibitionists reconsider the wisdom and fairness of using violence to stop people from getting high.

Maybe even in Texas. "As prosecutors we are bound by what the law is," says Brunner, "not what the law should be or could be. In Texas possession of THC oil is illegal, whether it is sitting in a tiny jar on the shelf or baked into an big batch of brownies. It is illegal—period. Unless the law changes, we will continue to prosecute such cases."

That sounds almost like a cry for help.

This article originally appeared at Forbes.