Ghost device crashing Smart Lighting

I replaced a couple of Z-wave devices yesterday. For one of them, I used General Exclusion to remove it. For some reason a random dimmer got excluded, too. I didn’t discover that until later when Alexa showed a non-responsive device.

I added the mistakenly removed device. It was part of a Mirror Behavior automation in Smart Lighting so I added it back.

All seemed well until this morning when I triggered my “morning” scene and the replaced light didn’t come on.

Not only that, but my V2 hub dropped offline. To shorten this story a bit, I crashed my hub three or four times before I figured out it was the Mirror Behavior automation doing it. There was an error for a non-existent device, then the hub would lock up.

I deleted the Mirror Behavior automation and recreated it from scratch, problem solved. For good measure I used the IDE to create a virtual device with the ghost id and then used the new app too delete that.