My modification to the driver does fix the problem with the queries, and with this fix in place, it is possible to enable IGMP snooping on the switch to avoid flooding the multicast to other devices.
However, I am now facing a different issue, which is that I get stutter on the TV (which is what the multicast is there for) when I run for example Speedtest on my computer. This saturates the WAN at 300 Mbit/s (both ways, in sequence), but the IPTV traffic is not using WAN. The traffic for that comes in on a separate VLAN.
I've also noticed that when the set top box is booting the router becomes really sluggish and I saw that ksoftirqd was consuming 40-50% CPU. I have no clue why, though.
I also tried reverting back to a build without my driver modification, with no difference to that issue (other than the fact that the TV stream times out after a few minutes due to the queries taking a wrong turn), so I don't think this driver modification has any adverse effects.