Fix handling of X-Forwarded-For header with multiple addresses (#1489481)