wlr_xdg_surface_from_wlr_surface() for example may return NULL even if the surface has the xdg surface role if the corresponding xdg surface has been destroyed.