Follow-on fix: count errors as well as test failures.
Merge branch 'master' into 3.1.x