Merge latest from master to 1.7 branch (in preparation for merge back and retirement of the branch)