Replace dns_rbt_addnode calls with dns_qp_insert. With QP, it sometimes makes more sense to first lookup the name and see if there is an existing node (rather than create new data, insert, find out a node already exists, and destroy the data again). This is done with dns_qp_getname(), which is more lightweight than dns_qp_lookup(), and we are only interested in if there is already a leaf node for this name or not.