Avoid flushing batches when inserting a fence if it is signalled already.
This is an optimization for the case where the fence is already signalled. If the fence is already signalled, going ahead and flushing batches anyway can cause extra unnecessary work to be done.