Merge pull request #2674 from wpaulino/consider-anchor-outputs-value-balances