fix(client): merge function headers with per-request headers (#5092)