Merge "Fix a bug in the type analysis phase of optimizing."