virt: Fix crash when introspecting the device