Fixing canonicalization and max stack iterator depth.
Improving containsKey().
Improving containsKey() and index() functions.