Fix Issue #4846(Maybe redundant JSType error report)
Lazy populating the typeState map and modified scanner to take definition for subclass when iterating over parent classes.