Add a test for #24419.