Add a test for #1241.