Problem: KeyPair::KeyPair() performed two required libsecp256k1 calls inside assert().
Disabling assertions skips those calls, so the Taproot tweak is computed from uninitialized data.
Supported builds reject NDEBUG, so this affects only unsupported configurations, but it motivated a broader audit of calls inside standard assertions.
Fix: Evaluate the required key operations explicitly.
Audit the remaining call sites and use the always-evaluated Assert() helper only when a call initializes output used afterward, mutates state, performs I/O, or releases resources.
Leave pure predicates and calculations as standard assertions.
Reproducer: Compiler Explorer demonstrates assert(keypair_xonly_pub(&pubkey)) skipping the required key derivation under -DNDEBUG.