Merge #11580: Do not send (potentially) invalid headers in response to getheaders