Add protection from infinite redirect loops to curl-using plugins