Semantic Analyser: Fix dead code detection