Add a reduced test case for issue 5291
Merge pull request #5443 from Snuffleupagus/issue-5291-test

Add a reduced test case for issue 5291