ExecutionMessage produce error "Value cannot be null.Parameter name: container"

After running 

AutomaticTask analyzeTask = project.RunAutomaticTask(
                targetFiles.GetIds(),
                AutomaticTaskTemplateIds.AnalyzeFiles);

I am using AutomaticTask.Messages and ExecutionMessage to get errors and warnings.   

I'm getting the error message "Value cannot be null.Parameter name: container"

When I open the project, I can see the error:

  

Has anyone ever seen this error?  How can I work around this error?

Thank you!

Rieko