Unit test for bug #1025

This adds an explicit unit test for bug #1025 -- and the old
code really does crash on this unit test.
Merge pull request #1073 from linas/ground

Unit test for bug #1025