Back-port the test fix from third_party.