Add test for #8075

fixes #8075 

the bug was fixed by #8293