Not really a bug, more a "gotcha".
There are many English/ Irish names that included an apostrophe, as in "O'Brien", "O'Keeffe" etc.
Group searches fall over when they encounter this:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Brien') GROUP BY
Cheers