Merge in test cases for GitHub issue #340.