CVE-2026-41651: Fix TOCTOU race on transaction flags that allowed unprivileged
users to install arbitrary RPMs and execute scriptlets as root; prevent
unconditional flag overwrite, enforce state-transition validation, and read
cached flags at authorization time rather than at dispatch.