|"Sorry guys, can't transport through that mysterious cloud ... again ..."|
1. Say "Yes." Is it really such a big deal, in D&D, if a wizard has memorized a 5th level teleport spell instead of a cloudkill that could lay low a whole room full of lizardmen- and then uses that spell to deal with a deathtrap? Do you really think brute force solutions are only for combat? Do you realize that blocking these spells, which your player's wizard has memorized with no guarantee that they'll come in useful, forces her into a dumb damage-max mentality? Do you not have enough killer combats and lethal traps set up that the party should be applauded for finding a way around them, instead of booed for avoiding three hours' worth of pointless exercise in your dungeon jungle gym?
2. Say "Yes, but." There are error chances on teleportation, and at the most common levels in AD&D the caster can't take along more than one armored bodyguard. Casting ESP on someone will likely offend them and may not even work if they get a saving throw or think in an unknown language. Be familiar with the difficulties of each supposedly "broken" player approach, even come up with further twists, but don't knee-jerk away from them.
3. Flip the script. If a party can fly up to the window, passwall through the wall, move invisibly and silently while the archwizard is sleeping, and steal the fabled jewelled skull ... best believe someone can fly up to the party's stronghold, passwall through the wall, move invisibly and silently, and steal the skull back plus a whole bunch of other stuff.
4. Be naturalistic about security. So, in a world with such magic, what are the odds that someone has developed countermeasures, and that the stronghold or ruin has got them deployed? Some already exist; for instance, lead sheeting against ESP. Point is, the security measures should be explicable and part of the naturalistic concerns of the opposition, not handwaved in as "super powerful ancient magicks." Security measures are also more fun if they add more difficulty instead of shutting down attempts completely; the wizard's tower protected against flying by a pack of circling griffons, and against teleportation by etheral dimensional hounds that can follow teleport-tracks, Tindalos-style. And soon enough, if you're taking advantage of point number 3, the party will want to know how to protect themselves ....
5. Make spells increase fun, not kill it. This wasn't really available to the designers working within the lines of AD&D, but it's what I and all the rest of the old school players can achieve through house rule tinkering. Teleport is caster-only. ESP lets you detect only the presence of a sentient being, and if they fail a save, a couple of cryptic words from its stream of consciousness. Passwall - nuh uh, no way, though I do allow a high level spell that lets you turn a 10' cube of stone into oatmeal. But then you have to deal with whatever might follow you through, instead of having it neatly close up after you. And also, you have to deal with all that oatmeal.