Fix subtotals in investment performance by account report
The subtotal rows were attached to the wrong groups. This change fixes the order of the rows.
BUG: 416274 FIXED-IN: 5.0.8