I remember in the second D&D Movie (which was direct to video and far more entertaining than the first) their mage lodges her hand inside a stone pillar when she teleports the party into the villain's lair.
That along with their cleric getting munched by a dragon convinced me that the plot was based on someone's real D&D campaign.
This is a reference to the early Wizardry games, which were based on a tile map, usually 20x20 squares but growing later on.
Teleport spells were of the "move x squares north, y squares east, z squares down" variety. And there were no protection against teleporting into bad places.
Teleport outside of the map? If it's above ground, you'd fall to your death -- which was bad, but recoverable from.
Teleport into rock? You lost the party. Permanently.
There was no confirmation. Oh, and "random teleportation" was one of the traps that could be on chests, instantly killing your party in most instances.
You learned very quickly to keep a second party geared up with your scraps just in case you had to start over. And you never, ever opened chests without help later on.