Line 12 aggregates long term gains or losses from multiple places. Here's the description: "The program will enter on line 5 the net long-term gain or loss from all Schedule K-1 Worksheets from partnerships, S corporations, and/or estates and trusts. The program will also include any long-term capital loss carryover from any Schedule K-1 Worksheet for the final year of an estate or trust."
Given your examples, it looks like you have a loss of -$5,372 coming from elsewhere on your return.