The code to expand macros has an optimization which is to only pick up a balanced token list from the input and place that in front of the macro to be expanded, as anything else would mean that the macro would be seeking an argument beyond the end of \unravel. But this optimization is wrong for macros delimited by begin-group characters. The first \unravel below is ok, but the second breaks, owing only to the absence of a surrounding simple group.
The code to expand macros has an optimization which is to only pick up a balanced token list from the input and place that in front of the macro to be expanded, as anything else would mean that the macro would be seeking an argument beyond the end of
\unravel
. But this optimization is wrong for macros delimited by begin-group characters. The first\unravel
below is ok, but the second breaks, owing only to the absence of a surrounding simple group.