The provided patch is b3e18f61e4 cherry-picked onto the 1.8.0 release which required some conflict-solving
b3e18f61e4