Added some tests for #21725.