Fix test expectance after adding layer name in error messages

See #1936