dyngroup: Fix traceback when delete a group