Removing not executed code with compilation errors