Update constant lookup to use stricter approach

This branch should fix the issue reported in #79.