[PATCH v2 14/35] qemu: dump: Move 'virCheckFlags' to top level functions