keep constant_result when coercing string to char
simplify search for duplicate values in SwitchTransform and make it safer for unexpected value nodes
extend SwitchTransform tests