Unit test for #829