[Olena-patches] 413: Enhance error handling in mlc::switch_.