base-stats: Fix self addition bug in addStatGroup
base-stats: Fix self addition bug in addStatGroup

A group cannot be added to itself; otherwise, it would
create a cyclic dependency.

Change-Id: I2e42f84814c675e8d5318cfda2d99b1b394758aa
Signed-off-by: Daniel R. Carvalho <91779fc734d358d9575ec4910de29bfcbcaf1b22@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/43011
Tested-by: kokoro <2ac7b1f3fa578934c95181d4272be0d3bca00121@google.com>
Reviewed-by: Giacomo Travaglini <8eef13a4f970e2e9372c8d26ad0737b760f99c02@arm.com>
Maintainer: Giacomo Travaglini <8eef13a4f970e2e9372c8d26ad0737b760f99c02@arm.com>

gem5/gem5,gem5/gem5,gem5/gem5,gem5/gem5,gem5/gem5,gem5/gem5,gem5/gem5