Bug fix: calculate trace_headers only if comming worker task
is a Hash