If the players were in a situation where they entered a castle where the outer walls were warded against teleport/transportation magics (warding was via a complex alchemical process done when the castle was being built - think gorgon's blood mixed in with the mortar from the stonework from 1E days)... they should still be able to use a Dimension Door or Teleport when they are within the actual castle, correct? If the outer walls are what was warded, it should be okay for them to say, Dimension Door from one interior room to the next, or to have one of them Dimension Door down a corridor and behind the guards to flank them.
Is this correct?
Is this correct?