Fixed #21417 -- Expanded TEMPLATE_STRING_IF_INVALID in blocktrans

Thanks keturn for the report and Chris Medrela for details.
Refs #19915.