Sync with upstream changes.
Adapt patch to function move.