Moved qname processing out of ctor and into set_qname to eliminate duplication.