Merge 1.9-maint into master

Replaces #983