Thanks bendavis78 for the report and Tim Graham for the review. Backport of f7a78f9bba from master
f7a78f9bba