Toyota has a drug problem. The company and CEO Akio Toyoda are dealing with the fallout from a bizarre case surrounding his newly promoted head of global public relations, Julie Hamp.

It all started on June 18, when Hamp, an American who moved to Japan earlier this year, was arrested for allegedly having a controlled drug sent to her from Michigan. The powerful painkiller oxycodone is a relatively common prescription drug in the U.S., but is designated as a narcotic in Japan, where users need permission to import it. Authorities could have chosen to confiscate the 57 pills sent to Hamp and schooled her on local regulations. Instead, they decided to make an example of her in ways that could damage corporate Japan’s efforts to attract foreign talent and diversify its boardrooms.

The day after Hamp’s arrest, Toyoda called a news conference to defend the company’s highest-ranking female executive ever. He launched into a spirited defense, declaring that Hamp hasn’t intentionally broken any laws. Those words came back to haunt Toyoda last week when police raided the company’s Toyota City headquarters and its Tokyo and Nagoya offices. The coordinated raids smacked of retribution by the police for Toyoda’s standing by a foreigner over local authorities.

What’s even more troubling is that the police made the case public at all. Hamp was forced to do a perp walk on live television. (It led the news on national broadcaster NHK.) But it’s safe to say the police wouldn’t even have told the media if a male Japanese Toyota executive were allegedly involved in similar lawbreaking.

Meanwhile, the thrust of the media coverage about Hamp’s ordeal has been cringeworthy. Rather than treat it as an unfortunate aberration, the media have used it as an excuse to pillory companies for trying to attract foreign executives to Japan in the first place. Toyoda’s news conference was a case in point, filled with insinuating questions: What medical condition does Hamp have that requires pain medication? Why does Hamp live alone? (The answer to that one is that her family hasn’t yet arrived from the U.S.) What is Toyota’s basis for trusting this woman so much?

Talk about a lost-in-translation moment for an economy Prime Minister Shinzo Abe insists is “open for business.” The way the story is playing out in the Japanese press, you’d think Hamp was accused of setting up industrial narcotics labs in Toyota’s offices.

Sadly, Hamp has been getting more headlines than another ambitious CEO who, like Toyoda, has been trying to raise Japan’s corporate standards. SoftBank’s Masayoshi Son last week announced a record-breaking $135 million pay package for Nikesh Arora, the non-Japanese former Google executive. Together with SoftBank’s announcement of a $20 billion deal to tap the solar power boom in India (where Arora was born), it’s a sign that Son is serious when he says he wants to expand to global markets.

Toyota, for its part, is spending $1.4 billion on new factories in China and Mexico to make cars closer to where they’ll be sold. Japan’s most most-watched companies, in other words, have been doing exactly what international shareholders want: investing in faster-growing overseas markets and diversifying leadership.

Yet the Hamp ordeal highlights the hurdles corporate Japan will have to overcome as it tries to go global. Why would other prominent female executives come to Japan if they think a poor personal choice would make them a national scapegoat? Might Toyota’s peers draw the conclusion that hiring non-Japanese executives is just asking for trouble?

Non-Japanese and women are still exceedingly rare within Japan’s top corporate ranks, and the latest headlines give little reason to think that will change anytime soon. Although Abe has pledged to improve those stats to increase innovation and productivity, the country’s insular culture clearly has no easy fix.

William Pesek is a Bloomberg View columnist based in Tokyo.