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