the flag-invariance sigcache code is not easily tested but willAdded testset for flag invariance/variance in cache. I played around with adding/removing flags to this test module (and sigcache.cpp) to see how it fails in both directions.
be tested in next Diff (when variant flag SCRIPT_ENABLE_SCHNORR is added).
Running test_bitcoin does succeed, for what it's worth.