Fixed a problem with the tests for bug #7591.