detect redirection loops