Fix #8570 and add test.