merge-recursive: move more is_dirty handling to merge_content