TurboTax Premium is showing a capital loss carryover for 2020 even though I reported a net capital *gain* on Line 16 of my 2019 Schedule D. How can this be?

I had a short term capital loss of, say, 500, and a long term capital gain of, say, 2000.  This leaves a net capital *gain* of 1500 reported on Line 16 of Schedule D.  Because of this, Line 21 will always be blank.  (TurboTax help says these two lines are used to compute the carryover.)  However, I do not understand why I can have a capital loss carryover from 2019 when I had a capital gain.