Clean up ERROR messages related to document structure and macros:
Hierarchical naming and mention macro names in messages.