Fixes Issue 9358 - Compiler creates duplicate switch cases on error.
Merge pull request #1521 from AndrejMitrovic/Fix9358

Issue 9358 - Compiler creates duplicate switch cases on error