Add test for issue #12552

Closes #12552