partly inspired by PR #263. This resulted in some error message
format changes (an improvement, I think), which caused some
unit test breakage. Removed those asserts from the unit tests,
since tests shouldn't be testing human-targeted error messages.