Remove unused code that causes an exception in rare cases and add a unit test for that case. Fixes #1748.
Merge pull request #1771 from danielgtaylor/term-instances

Remove unused code that causes an exception in rare cases and add a unit test. Fixes #1771, #1748.