Issue #19634:change exchgain calc when mixed currencies