Restore the change removed by r4035 as patch this time.
(cherry picked from commit 0f8307d9d6985d2df2a4b8e9751b266e62715f13)