added test for issue GH 8866