While running this, I found a null bug that prevented the flag for "wasRedirected" to never be set. This corrects that issue.