# Looking for trouble: the κ letter, the combining ⃗, ucharclasses and xparse… (error with κ⃗ but not with k⃗)

Now I'm seriously puzzled. Here's the MWE (using xelatex).

\documentclass{article}

\usepackage{xparse}
\NewDocumentCommand{\li}{v}{\texttt{#1}}

\usepackage{fontspec}
\usepackage{xunicode}
\usepackage{xltxtra}
\usepackage{ucharclasses}
\setTransitionsFor{GreekAndCoptic}{\begingroup\fontspec[Scale=.85]{DejaVu Sans}}{\endgroup}
\setTransitionsFor{CombiningDiacriticalMarksforSymbols}{\begingroup\fontspec{DejaVu Sans}}{\endgroup}

\begin{document}
\li+κ⃗+
\end{document}


I believe the title says it all. I'm getting:

! Extra }, or forgotten \endgroup.

Things work fine if I write either κ⃗, i.e. without the call to \li, or if I write \li+k⃗+, i.e. without the greek κ but with a roman k instead.
• Do you have any problems if you change the definition of \li to not use verbose arguments? – Sean Allred May 5 '14 at 13:50
• Nothing really to do with xparse: if you try your setup with just κ⃗ in the input stream you'll see there is a warning in the log that a group has not been closed. – Joseph Wright May 5 '14 at 13:55