Apply slightly modified version of patch from #162
Changelog entry re #162