There are magic words that are directives to the
parser, e.g. __NOTOC__ and
there are magic words that are variables to be expanded, e.g. {{PAGENAME}}.
I don't necessarily consider it a problem to have the two forms, so long as
the syntax is unambiguous (i.e. wrap in __ for parser directives, {{ }} for
variables). I am not sure if this is currently the case or not.
However, __TOC__ is of the latter type, but the former syntax. Well,
in fact, it's of both types. It's a directive not to include the TOC
in the normal position, and to include it in a different position.
It's difficult to draw a clean line between the two types of magic
word.