The attached patch partially corrects this bug. It works for normal
multicast queries, but doesn't address legacy unicast queries. That's
better than nothing, and is sufficient for my purposes, but a complete
fix should address legacy unicast queries as well.