The ability for pegasi and earth ponies to noclip through walls was removed, but Unicorns still can do it. I think everyone should equally be able to noclip, or nobody can. It is extremely hard to make the teleport spell foolproof though, so I totally get it.
The bottom of cloudopolis has a layer which teleports you if you fall down through it, (but strangely not if you fly up through it, what's up with that?) that I think could be used slightly behind all the walls in the game to teleport people back to the spawn if they manage to teleport through the first wall. It would probably increase the file size of all the maps a lot.