Add a test for #2222