X11::XCB < 0.08 had a bug which caused this code to work even though it shouldn’t.
Previously, when you had an urgent container in a stack on some invisible workspace (say urxvt) and you switched to it, the urgency hint was not properly cleared.