[PATCH v2 23/35] qemuDomainGetMetadata: Add top-level flag validation