fn matches_item_name(item: &DocItem, name: &str) -> bool
Helper to check if item already exists in the list