applied a patch from Jonathan Yu, reported by gregor from debian to resolve #77717