Apply #2241 to 3.8.x