MarkB
Legend
Three nut shells as the material component for Confusion is a joke - based on the slang usage of "nuts" to mean crazy.
A pinch of sesame seeds as the material component for Passwall is also a joke - based on the tale of Ali Baba and "open sesame" as the password for the bandits' cave.
Not only are they jokes, but they're jokes based on idiosyncracies of English usage that there is no reason to suppose make any sense in the fiction. In Greyhawk, when a Suel-speaking apprentice asks a Suel-speaking master why they use nuts as the material component for a Confusion spell, what answer does the master give? Am I supposed to imagine that "nuts" is a slang word for "crazy" in every single language in the D&D mulitverse? That every wizard is familiar with the tail of Ali Baba and the Forty Thieves?
Actually, once one prominent arcane tradition starts using a specific material component, the folklore associated with that component will tend to be re-told amongst apprentices of that tradition, and from there may enter into common folklore and be disseminated far and wide, eventually being adopted by other arcane users. So to some extent these little cultural references will be self-sustaining - the memes of the fantasy culture.
And as to real-world versus fantasy world references, how often do you worry about that otherwise? Do you take the time to strip every idiom from each sentence when talking in-character, never venturing a joke or play-on-words for fear that it wouldn't translate? Or do you simply assume that standard translation convention applies, and that what you say in English is simply an equivalent to what your character is saying in Common, or Elven, or Suelese?