Avoid infinite loops by only retrying once on failures