Some final changes to prepare for submission.
Fixed an error where we checked variables in a least to most local order in lookupType.  Added a test to check for this issue.