Improve endless loop redirect detection