They don't know that. Only you do as the DM. So their experience is the same either way-- they thought of an idea and the idea worked.To me doing that ruins the experience, since they essentially didn't discover anything, instead they made it up and are being manipulated into thinking they discovered it. It's basically the quantum ogre, only you've forced the player's idea into reality instead of your own.
So given the choice, I'd rather have happy players that actually get what they are looking for and continue to move their actions forward to continue their story, rather than them circling the same drain for 3 hours with their thumbs up their butts unable to go anywhere. But your mileage may vary.