Fix tests after sync with upstream.