add test for issue #5006