Fixed a couple of tests and problems for bug #8380.