#653940 follow-up by carlos8f and sun: Fix fatal errors in tests and revert changes to error reporting in previous patch.