It sounds like a flimsy excuse. But poppy seeds really can make you fail a drug test, peer-reviewed scientific studies have found. Because they’re derived from opium poppies, they sometimes contain traces of morphine, not enough to get you high, obviously, but potentially enough to register on a highly sensitive drug test.

That’s what a Maryland mother says happened to her in April when she went to the hospital to give birth. Elizabeth Eden told WBAL-TV that she’d eaten a poppy seed bagel before going into labor. While she was having contractions, a doctor informed her that she’d tested positive for opiates.

Recalling having heard that poppy seeds could result in a false positive, she asked the doctor to test her again, she said. According to her account, he refused, and reported her to state officials. “It was traumatizing,” she told the station.

The test result meant that her daughter had to stay in the hospital and be monitored for five days. Afterward, a case worker determined Eden was “a legitimate case of the poppy seed defense,” WBAL-TV reported.

Surprisingly, she’s not alone.

In October 2010, the American Civil Liberties Union of Pennsylvania filed a lawsuit on behalf of a woman who had her 3-day-old daughter taken away for five days after she ate a poppy seed bagel and failed a drug test. They alleged that Jameson Hospital in New Castle, Penn., had used a threshold that was significantly lower than what the federal government requires for workplace drug testing. The hospital and county settled for $143,500 and agreed to change their policies.

A similar lawsuit against the same county filed by a woman whose newborn spent 75 days in foster care after she ate a salad with poppy seed dressing settled for $160,000 the next year.

While it may be true that “a few” poppy seeds won’t necessarily result in a failed drug test, it’s nearly impossible to definitively answer how many poppy seeds are too many. The amount of morphine residue on poppy seeds can vary, depending on how they were cleaned and processed. For that reason, the U.S. Anti-Doping Agency’s website tells Olympians that the “most conservative approach would be to avoid poppy seeds a few days before and during competitions.”

There may be hope for bagel enthusiasts: a British specialty foods company has developed a low-morphine poppy seed that won’t show up on a drug test. Until those become widely available, however, you may want to stick with sesame.