testsuite: Add test for #4523
Merge pull request #4811 from catamorphism/issue-4523-testcase

auto: testsuite: Add test for #4523