In keeping with Marvel Cinematic Universe, Captain Marvel features a Stan Lee cameo. What is a little different this time, though, is how it plays out in the movie.

Shortly after Vers (a.k.a. Carol Danvers, a.k.a. Captain Marvel) lands on Earth, she finds herself on a train, trying to spot the shapeshifting Skrull among all the ordinary-looking human passengers.

At one point, her eyes fall upon an elderly man conspicuously reading a Mallrats script. It's Stan Lee, practicing his lines for his cameo in that other movie. "Trust me, true believer," he mutters to himself. You can watch that entire Mallrats scene below:

The Captain Marvel scene was originally written by directors Anna Boden and Ryan Fleck as just another fun, funny appearance by the comics legend. But after his passing in November, the filmmakers felt compelled to update the sequence to acknowledge the "gravitas" of the moment.

"Instead of just the pure laugh we had, we had a little bit of a smile from Captain Marvel in response to it, and she kind of breaks character for a moment," Boden told me during an interview in Los Angeles last month. "I think it reflects a little bit of what the audience is feeling, and we allowed that to happen."

In the finished cut of Captain Marvel, Vers' gaze lingers on him for a few moments and she smiles to herself, before moving on with the rest of her quest. At the screening I attended, the audience definitely appreciated the homage – there were sighs, moans, and even a smattering of applause.

That cameo is actually the second of two Lee shout-outs in the film. The first occurs right at the start. The usual Marvel Studios opening fanfare is replaced by a special Lee-centric version, featuring all his many cameos across various Marvel movies.

That one, Boden and Fleck tell me, was not their idea – though they were very much on board as soon as they heard about it.

"The Marvel logo was a Marvel thing that they prsented to us," Fleck explained. "They said, 'Hey guys, what do you think of this? We were thinking of doing this for the movie.' And we were just like –"

"Loved. We cried," Boden recalled.

"We were just moved by it," Fleck added.

While Boden and Fleck's time with Lee was limited, it's clear they'll remember it fondly.

"We feel really lucky to have gotten the opportunity to meet him, and have that special moment on set," Boden said. "There's so much reverence when he comes around, and he brings so much life and respect there with him."