CMake: Allow override of unexpected non-flow-control commands

Fixes: #22310
6 files changed