Add a test for #4737.