Patch #6386. Thanks to John Darrington for review and for the