TST: add tests for GH 6572

Closes #6572. It seems to be fixed by #7465 as a side effect.