Forward port of branch 8.0 up to rev 775eaae93