Error messages: delayed rendering with templating

Should probably use `REPLACEMENT_PLACEHOLDER ` somewhere in this comment, just so that it's known what actually gets parse in case we do change the templates