Add a (linked) test case for bug 1064894

This should have been part of PR 5284.
Merge pull request #5528 from Snuffleupagus/test-bug-1064894

Add a (linked) test case for bug 1064894