Fix an issue with redirect_to recursion.