Fix for issue5194, based on a patch by Ned Deily.
8 files changed