Fix serach in dynamic groups. closes #2218