Extended (re)fix based on current canary - supersedes #768

For issue description, see #758 

If everything looks good, the old #768 should be closed.