Function fix_recursive_patterns

Source
fn fix_recursive_patterns(doc: &mut Document<'_>)