Fix NPE error message for templates that have not been properly started.

[Review issue 9492001]