Fixup dtor for `name` expression, and fix `iname`

Long overdue unit test for the name expression.  Catches a fault
when destroying name terms if you're using a name map and fixes
case insensitive name comparisons.