How are you testing this? Are you using the actual debugger or eyeballing the result? How does the data flow:
You say, the var is true while it, clearly, is not - as confirmed by the log. Could the issue be that we’re testing / observing the wrong thing?