Causes
The error message is due to the fact that the grouping in the Sum in column is not equal to the Group of the totalization row.
It may not be a mistake
The amount of the account will be totalized in the indicated Group, no matter where the account row is placed in the accounting plan.
There are cases where a non-sequential disposition of the accounts is required, and it's therefore not a mistake.
Solution
Verify that all accounts listed and meant to be totalized in the same Group have the same Sum in code. More information are available at the Groups page.