Add a test for #580