Restore selected code improvements that missed the 8.5.14 release.