This prevents problems with repeated detection of the same invalid session when the redirected request comes in.