Backport to 1.7.2