Fixed the false positive when outer if statement has else branch