Fix variable definition with the same name in a case statement