Fix 3 trivial (possible) errors, discovered by covertity.com
[98c8b3ec12] Make test fail in less catastrophic manner.
merge trunk
resolve fork