L1TopoCoreSim: Fix gcc11 warning.
Check result of dynamic_cast before dereferencing. (Can also exit the loop here early once we find an entry with overflow true.)
Check result of dynamic_cast before dereferencing. (Can also exit the loop here early once we find an entry with overflow true.)