Add a test for issue #772