Before the opening credits we see Bones thinking about Alice in Wonderland, and then he sees Alice in wonderland. Every viewer (save perhaps the Voyager fans) figures out right from the start that these things are appearing because of their thoughts. We have to witness example after example throughout the episode making this painfully obvious, yet it takes about 40 minutes for Kirk to verbalize that he’s finally figured it out