Changing the security of a transaction does not update balance
When the security of an investment transaction (e.g. buy) is changed
from security A to security B, the balance of security A does not get
updated. This causes to display false values.
This change fixes the problem by first removing the split referencing
security A from the list of transactions and then updating the balance.
BUG: 411015
FIXED-IN: 5.0.8