Shouldn't it be >=? If the enqueue operation is the one setting it, it should increment the counter I think. Unless the process that rebuilds the states will process the first enqueue which I don't think is right.