bucketUnminedCredits contains outputs from mined transactions, is not fixed by rescan
It's been observed that bucketUnminedCredits contains spent outputs of mined transactions, and that rescan does not fix this inconsistency. This can lead to double spending errors, and is possibly also inflating the unconfirmed balances.
While rescan can and should be changed to fix this issue, as it is very real state that wallets may wind up in, it's not yet known what is causing this situation. Until it is properly fixed, even more rescans may be necessary.
I don't recall the exact circumstances or wallet settings leading to the original issue, but recently saw this again. The problem eventually went away after I dropped my --watchlast setting and performed a new rescan of all addresses from genesis. So my guess is that was part of the initial problem, and this needs more investigation that rescans properly work with --watchlast.