WiFi Trigger Macro Just Started Glitching!

I have two macros set up. When connected to my home network, I switch the 'location' to 'Home' which uses my Pi-Hole as DNS server. When disconnected from the home network, it switches the 'location' to 'Automatic' which uses as DNS server.

Starting yesterday, my wifi got stuck just switching back and forth between being either ON or OFF. There was no other state. Manually turning it off or on didn't work (there wasn't enough time to do it). This morning it dawned on me that it might be related to KM. I disabled one of the two wifi macros, and the glitching stopped immediately.

The macros do not control the WiFi state of on or off, only which location is set. So why would this cause the glitching? Any ideas?