Finally backported in a nice way.