Add test for issue 7181.

Although it doesn't solve the transform, it is not crashing now. Fixes #7181