Test for #4573 (False positive: variableScope within if/else if)