Your solution is absolutely correct: the inner stuff needs to be in braces if it contains a
I'm pretty sure we've had a question which had the same underlying cause as this, but I don't know what to search for so can't find it right now. If it exists, it probably has a full explanation, but just in case it doesn't here's a quick version.
Optional arguments, such as that to the
\item command, are not parsed in the same way as mandatory arguments. When LaTeX says "Looks like an optional argument here", TeX starts looking for the end of it. That end is signalled by a closing square bracket,
]. So TeX looks for one which is at the same grouping level as the opening bracket. So far, so good. And so far, just the same as with braces (
}). The crucial difference is that an opening square bracket does not open a new TeX group. So in
\item[[hello]] the first
] is at the same level as the opening
[. The second
[ does not affect that. So it is the first
] which is taken as the delimiter.
So when you type
\item command get
[hello as its argument. The first
[ and first
] are eaten up, and then the start of the item is the second
]. So the space is the space between the item label (which is
[hello) and the item text (which starts
In these cases, the solution is to explicitly add a level of TeX grouping so that TeX sees the correct closing square bracket. This is what your solution does. Now, it is the second
] which matches the first because it is the first one which is at the same level. Then
\item gets (in my example)
[hello] as its argument and it is the second bracket which is swallowed.