Test and fix for issue #763