(#21947) Add missing error message for ILLEGAL_NAME

The faulty behavior was triggered by interpolation of an illegal name.
e.g. "Contains $CONTRABAND".