fix Issue 11822 -  switch causees ICE with  return and other stuff