Added assertion in is_equal_element_attrs