Fixed some tests for bug #8296.