Fix crash with unweighted upstreams.
Stop processing headers in parts.
Remove unused variable.