TST: add test for #5087