Turns out the reason is that I had an include (config) file starting with "hide empty attributes". This option is used in a class diagram, so later when PlantUML sees Component diagram syntax, it gives an error.
I think the options should be permissive: allow all options from all kinds of diagrams to be used, but no option should commit to a specific kinid of diagram. This way people can use one "config" file for all of PlantUML, instead of needing one file per diagram type.