Add test for Bug #15572 from pull request #820