SE-1079: Avoiding a redirect loop