Fix undefined messages in w3c tests

Makes w3c test fail informatively (#895).