Fixed #21587 -- Raised deprecation warnings correctly.

I wouldn't have changed the ones where the test doesn't care either way what type of redirect is done (of course we'll have to go back to silencing those)