Attached is a patch offered to use by the reporter of this issue, who writes: "BTW, we can make the behavior as compatible as before by applying the simple patch that I'm attaching (it could be even cleaner with some refactoring, but this patch is more concise). If you can make something similar to libdns, that would also help us as (in a longer term) we don't have to maintain one custom change ourselves."