Don't apply string placeholders to legends if unneccessary

Avoids "too many arguments for format string" when `$DEBUG` is true and the string isn't expecting a placeholder. Couldn't find a neat way to write a spec for this.

Fixes #1090