would love to see that bug actually. Were the only clients that were seeing this change of the router wireless?
How would it know to hand out the dns that was configured on the first dhcp server? And again it can not stop the packets from being seen by the other clients that are broadcasted. So it would be impossible for it to be faster while changing out the router and then rebroadcasting it.
While I don't doubt there was something odd going on, think we are missing the details of the actual problem. Changing out the gateway of some other dhcp servers packets with its own does not seem viable as what was actually going on to be honest.
OK maybe it wasn't "relaying" it or "changing packets on the fly" maybe it was listening for other DHCP servers on the network, then taking the liberty to automatically become a 'secondary' DHCP server even though DHCP was turned 'off' by cloning the records given out by the other DHCP server, and then due to a bug (apart from doing this without being told) the default gateway is not cloned properly and sets itself as the default gateway even when it's not. Maybe the technical term is "doing some pretty weird stuff". Maybe it is D-Link trying to be smarter than what they actually are and then not testing their product in this configuration to see if this actual 'feature' works.
The D-Link was connected to the rest of the network via one of it's LAN port, therefore it was part of the same segment as the rest of the network.
All clients on the network set to get a DHCP address were experiencing the issue, even if not directly connected to the D-Link. Occasionally a client would get the correct address (1 out of 10 chance - rough estimate). If I unplugged the D-Link from the network, clients on the rest of the network would always get given the correct default gateway 10 times out of 10. Plug D-Link back in and same problem starts. The main DHCP server was a Netgear router, and not due to latency or anything, I think it was just a tiny bit slower giving out DHCP addresses most of the time, but still appeared to be a race condition.