Add test for #842