Simplify shared error messages template

Just display the error if there is only one, rather than iterating
over the array anyway.