MT#8547 - replaced experimental "smartmatch" code with the sane if/else custom SWITCH blocks