dyngroup: Refs #2182 Traceback when create static group

Fix a traceback when creating static group