Backported fix for broken test case.