Bug fix for possible key misses on dictionary lookups.