Handle namespace collision warnings

This handles namespace conflicts warning when you use a class that conflicts with different class names the namespace hierarchy.

@ke-yu @aparajit-pratap 

looking at the implementation...one question - why we need this ``GetResolvedClassName`` instead of calling ``GetAllMatchingClasses()`` directly?