Redundant needsFlush boolean

It is a local variable that is always either set to true or not read from.