Cherry pick a fix from `master`.

- Revert wrong cherry-pick and pick correct commit.
- Update sources