"Mayer kept taking it out during test screenings," says Charles Troy, who will delve into the movie's back story Wednesday afternoon as part of his ongoing lecture series at the Wilmette Theatre.

Traditionally, the focus of Troy's presentations has been Broadway musicals.

"Then I thought, 'How can I neglect "The Wizard of Oz"?' It's the most iconic and most-watched movie in history," he said. "I started researching, and what I found out was that there's a heck of a lot of interesting things that most people don't know about."

A self-educated scholar, Troy does exhaustive research for each of his lectures. For this one he consulted with no less than John Fricke (widely considered the most authoritative "Oz" scholar) and Ernie Harburg, whose father wrote the lyrics to the film's score.

But let's get back to Mayer and his bullheadedness.

"Be smart but never show it," is one of Mayer's more famous sayings, but the man who built MGM into a powerhouse occasionally found himself tripping over bad instincts (not to mention a lacerating tongue; displeased with the posture of 16-year-old Judy Garland, he took to calling her "my little hunchback"). And he was adamant -- adamant -- about his distaste for "Over the Rainbow."

Here's Troy's breakdown of the dispute: "Mayer thought it slowed the movie down. That it was too serious a song -- too long a song."

You can see Mayer's point. Who starts a movie with a momentum-killing ballad? (Although Walt Disney had done just that two years earlier, placing "Someday My Prince Will Come" right at the top of "Snow White and the Seven Dwarfs." Ironically, that film's massive success is what propelled Mayer to develop his own musical for kids, "The Wizard of Oz.")

Nevertheless, Mayer wanted the ballad gone, and here's what Troy unearthed during his research:

"They kept taking it out and putting it back in, and after the third time they cut it from a test screening, (producer) Arthur Freed finally said, 'What exactly is your problem with this?' So he listens to all the reasons, and then his response is: ' "Rainbow" stays, or I go.' "

Bold words. But at the time, Freed was producing yet another Garland musical for Mayer ("Babes in Arms" with Mickey Rooney) that was midway through filming: "Freed realized he had some leverage, and if not for ' "Rainbow" stays, or I go,' that song would never have been in the movie."

"The Wizard of Oz" would go on to win two Academy Awards, including best song for "Over the Rainbow" (Mayer really ate crow on that one, didn't he?), and yet everything about the film's gestation suggested disaster. As many as 14 writers were assigned to work on the script, with just as many drafts floating around. (The final version was cobbled together by the film's lyricist, E.Y. "Yip" Harburg, who essentially cut-and-pasted bits from each draft.)

Five directors were assigned to the film, although only three actually directed scenes. Richard Thorpe was on the film for barely two weeks before producers, unhappy with his work, switched him out in favor of Victor Fleming, who is the credited director on the picture and was responsible for all the scenes that take place in Oz.

But then Fleming, too, was reassigned to another movie.

"He would have finished the picture," said Troy, "except that Clark Gable, who was a good buddy of Victor Fleming's, had just started on 'Gone With the Wind' and was very uncomfortable being directed by George Cukor, who was known as a women's director."

Apparently afraid he would contract a case of cooties, "Gable demanded that Fleming be brought in to direct 'Gone With the Wind,' so suddenly Victor Fleming was yanked off 'The Wizard of Oz' with just a few weeks left to go, which left a vacuum with the Kansas scenes."

The producers brought in King Vidor, who had made his name in silent films, to shoot the black-and-white portions.

Even the score was still coming together during the shoot. Songs were added at the last minute, including "Follow the Yellow Brick Road/You're Off to See the Wizard," written at Fleming's behest when he realized they needed something to close out the Munchkinland scenes.

"It was very much seat-of-the-pants," is how Troy described the film's creative process. Then there's the jitterbug scene, which took five weeks to shoot only to end up on the cutting-room floor.

Much of Troy's lecture on Wednesday will center on an early-1902 musical-comedy stage adaptation of L. Frank Baum's book, which premiered in Chicago before heading to New York (Troy describes that long-forgotten score as "almost unlistenable"); the film's early casting snags (a glammed-up Gale Sondergaard was the original choice for the Wicked Witch, only to be replaced with the plainer-looking Margaret Hamilton) as well as the story of the film's songwriting duo (the aforementioned script doctor Harburg on lyrics, Harold Arlen on music) who came to the project with minor-league reputations. What does it say about pop culture that these two men never became household names despite the ubiquity of their score?