add test case for #8585