Case:
You have a transaction which has multiple outputs to different addresses in your own wallet (let’s say 2 for example). One of the output has already been spent, and the other is unspent.
The problem is that if you import this transaction into your wallet using ImportPrunedFunds it will add both the unspent and spent amounts to your listunspent.
And if you use RemovePrunedFunds it will remove both the unspent and spent amounts.
Suggested Handling
RemovePrunedFunds / ImportPrunedFunds should accept an additional optional vout parameter, so that you can specify exactly which vout you want to add or remove as a UTXO