v13 port because otherwise backports will result in conflicts always
(cherry picked from commit ccf84ae88a)
ccf84ae88a