Fix dynamic groups. closes #1933