It looks to me as though people were using the value "," as the quote string in order to disable quoting, and that the prior code was attempting to accept that.

The old code looks weird though - as far as I can work out the old code is carefully calculating the value of isquoted (correctly, if slightly oddly), and then overwriting it with the calculation at line 280.

I rather suspect that a prior attempt to fix this bug wrote the new code but forgot to delete the old.