Fix scope warning without adding extra code

You could rewrite it as

foo = (condition && foo+1) || foo

or even

foo = condition && foo+1 || foo

but most people would not find this easier to read.