Improved error messages in self tests.