test case for #5084