When exporting transactions as a CSV file, the "confirmed" column always showed True for transactions sent to self, even when not confirmed yet.
This fixes this bug.
This is a backport of [[https://github.com/bitcoin/bitcoin/pull/14988 | core#14988]]