Add test for #645.