Added a check for current component name matching as well as existing variant.