[This story contains spoilers from the third episode of season 10 of HBO's Curb Your Enthusiasm, "Artificial Fruit."]

On Sunday night, the TV version of Larry David had some image rehabbing to do. But in classic Curb Your Enthusiasm fashion, the latest offering in the 10th season of David's HBO comedy saw his alter ego accidentally wading into even more problematic waters.

"This entire episode is an exercise in — how deep can Larry dig a hole?" Curb executive producer Jeff Schaffer tells The Hollywood Reporter, with a laugh. "That’s sort of a microcosm of Larry's life: He’s trying to do something to save his skin, and he ends up doing something awful and he has to save his skin, and it just turtles all the way down."

The third episode, titled "Artificial Fruit" — which was directed by first-time Curb helmer and co-star Cheryl Hines — set Larry out on a mission to reset his reputation amid a sexual harassment complaint from his female assistant. On the advice of his lawyer (Ben Shenkman), Larry makes a sizable donation to an advocacy group for sexual assault survivors in order to hopefully change the mind of Alice (Megan Ferguson), who has grown increasingly offended by her boss' lack of boundaries in the #MeToo era. Larry also agrees to speak at an event for the survivors' group, which is being hosted by transgender activist and actress Laverne Cox.

When Cox — playing herself in a one-episode appearance — first meets Larry, she opts not to shake his hand because she has a cold. For the hypochondriac at heart, this gesture greatly pleases Larry. But later, when Cox introduces Larry to the stage during the charity event — amid a room filled with survivors — he pulls away from her when she goes to hug him. Larry's attempts to explain himself — "She has a cold!" he shouts to the crowd — are drowned out by boos and flying baskets of bread being thrown in his direction from the women, who interpret his physical reaction as being wildly offensive.

The bit, as Schaffer explains, was written with Cox in mind: "We had this idea about a transgender person having a cold and, as a result, Larry recoils from kissing them. It’s one thing to do it in front of one or two people, so we thought, 'Let’s do it on stage.' We thought Laverne would be perfect for this because she’s funny, she’s take-no-prisoners and she’s front and center for transgender people — not only in front of the camera but behind the camera with all the amazing things that she’s done. She’s a wonderful spokesperson for transgender people around the world. So, what better person to have Larry recoil from than her?"

In addition to the event snafu, David and Cox's scenes included an improvised back-and-forth where Larry asked Cox ignorant questions about trans people. When Schaffer pitched Cox the episode idea, he said she laughed and was on board, and she also offered valuable input once it came time to film. "The nice thing about the show is, no one else is a bigger idiot than Larry," Schaffer explains. "One of the things that was fun for her is that Larry is saying so many obliviously ignorant, stupid things, and she gets to react to that stuff in a fun way but still get her completely valid point across, which is: You people are acting like idiots."

Calling the pair a "very funny comedy duo," Schaffer says there is a much longer version of the improvised scene, which saw Cox and David going off on other digressions, that they had to cut in order to fit the episode for time. "Larry had a few questions that he was going to ask Laverne and then as she was giving it back to him, he asked more questions to dig himself into a deeper hole, and it just keeps going like that," he says, while also praising Hines for weaving the episode through some sensitive areas. "It's two people who are really good improvisers just talking through these awkward situations. And that’s the fun of doing this and why we wanted to do it: It’s an important issue. It’s also an issue that people are really afraid to talk about because they don’t know how to talk about it. People get really nervous. And the nice thing is that with Laverne, there’s nothing to be nervous about. She’s great, Larry’s great; we’re gonna have fun. It’s just two actors who are really good improvisers going at it."

Indeed, three episodes into the season, Curb has already approached several hot-button topics with comedy, such as the #MeToo movement and politics, with a pro-Trump MAGA hat bit. Now, after introducing a transgender character last season (Joey Funkhouser, the transgender son to Marty Funkhouser, played by the late Bob Einstein), positioning Larry as an aspiring ally to both women and the transgender community amid the current climate shows how Curb isn't afraid to evolve with the times.

"We love hot-button issues. We’re kind of the comedy marines — we see danger and we run right towards it!" says Schaffer of no topic being off-limits for their comedy brand. "We can do it on Curb because sometimes Curb is a comedy-horror movie; I always say that. And getting Larry together with Laverne Cox to talk about all of this stuff — as soon as you see that set up, you’re so nervous about what’s going to happen. And those are sometimes the best scenes."

Remaining true to the world of Curb, while also using Cox's input, resulted in what ultimately played out onscreen. "Something that Laverne thought was important [was to tell us], 'People who are going through gender transition aren’t just about a surgery.' We wanted her to be able to take Larry down a peg for being oblivious, and then Larry, who is just a very curious sort, has a lot of questions. She was great about telling us, 'Here are a lot of the really annoying and stupid questions that people in the trans community get.'"

Larry was also accused of exercising his white male privilege when he was called out for not investing proper time and care into the artwork that he submitted for the event. "[The real] Larry cares about one thing: that the show is funny. He’s willing to do just about anything if he feels like it’s a good story and will make a funny scene." says Schaffer of the topical bits. "He has no fear that way. Who else would be willing to put themselves in these positions? And make it super funny? He’s the only one."

Adding of the response so far, "We hoped people would find the season as funny as we did. But we never anticipated it would resonate so much with where everybody in our audience is at right now in this moment in the world. I think that did catch us by surprise a little bit. The TV landscape is like Vegas — there’s so much to do! We’re just happy that people are coming to spend their brain cells at our blackjack table. So, we’ll just keep working on what we think is funny."

After the disastrous event, the episode ends with assistant Alice possibly choking to death while in an elevator with Larry. After offering her one of his dry scones (another plot involves Larry opening a "spite store" in hopes of putting coffee rival Mocha Joe out of business), Alice chokes and Larry, too nervous to inappropriately touch her body, opts not to perform the Heimlich maneuver in a moment of panic.

"There doesn’t seem to be any safe area between the knees and shoulders, the whole thing is a strike zone. So she drops to the floor and we’ll just have to wait until next week to find out what happened," says Schaffer. "How is he going to get out of this one? Again, something selfish leads to something bad, which leads to something selfish."

And while the previews for the fourth episode seem to indicate that Larry is moving along with his life, Schaffer warns about teasers being a classic misdirect. "We make sure you never know anything," he says. "Larry doesn’t even want previews — it’s a real struggle to have those on the end of a show!"

Schaffer does, however, double down on his earlier tease that the sexual harassment complaint will continue to follow Larry, as he digs himself further into that hole. "So [at the moment], he’s misinterpreted as this sexual predator who is anti-woman and now anti-trans. We’re definitely going to be touching on this subject more throughout the season. There are a whole bunch of other things going on too, but we’re definitely not done with this thread," he says.

Adds Schaffer, "I can’t tell you when. But Larry’s still gotta shovel."