[libvirt] [PATCH] qemu: Use correct permissions when determining the image chain