WIP - Update constant lookup to use stricter approach

This branch should fix the issue reported in #79.

I will wait to hear back before working on this further and cleaning it up for a merge into master.