Little optimization in Component::hasProperty

Just like the optimization in the Object::hasProperty