Test failure demonstating the bug
Fix bug and put in extensive tests
Merge pull request #256 from rmcgibbo/bug255

Bug255