[libvirt] avoid new "make check" failure and fix a related bug