Prevent redirect loops from crashing.

Bug: 54403
Change-Id: I713487f74d0b85af2310cb528a0519f32bc88017
Merge "Prevent redirect loops from crashing."