Fix sporadically failing unit test.