Add test for PR #792