Backport fix for #222 in 1.7.x