def _name_matches(element_def, element):
    """ Checks for match in the element name, performing a strict match based on the name regex in the def. """
    if element_def.name_matcher.match(element.name):
        return True
    return False
