The mIRC Script parser is highly irregular and fragile. It's ad hoc and it's interpretation can often be hard to predict. Inconsistencies like that one are regular occurences.

This is a pitty, partly because parser construction is a very well researched branch of computer science, i.e. there are very well known and regular techniques for making parsers, it's not much of a craft and very much engineering. And it's easy, dead simple, once you know a good tool (and many good tools are available for free).