Merge pull request #18050 from rohitwaghchaure/revert_bom_recurrsion_changes

fix: revert changes of bom recursion