cleanup: rescue TapFormulaAmbiguityError caused by Dependency#to_formula
cleanup: rescue TapFormulaAmbiguityError caused by Dependency#to_formula

Closes Homebrew/homebrew#40682.

Signed-off-by: Xu Cheng <9a05244150b861e40c78843b801eed71bca54eac@me.com>

rwhogg/brew,EricFromCanada/brew,muellermartin/dist,mahori/brew,amar-laksh/brew_sudo,claui/brew,mgrimes/brew,DomT4/brew,reelsense/brew,ilovezfs/brew,konqui/brew,maxim-belkin/brew,staticfloat/brew,sjackman/homebrew,Homebrew/brew,EricFromCanada/brew,rwhogg/brew,reelsense/brew,muellermartin/dist,bfontaine/brew,Linuxbrew/brew,MikeMcQuaid/brew,nandub/brew,zmwangx/brew,sjackman/homebrew,Homebrew/brew,amar-laksh/brew_sudo,aw1621107/brew,hanxue/linuxbrew,staticfloat/brew,vitorgalvao/brew,aw1621107/brew,Homebrew/brew,tonyg/homebrew,reitermarkus/brew,nandub/brew,zmwangx/brew,jmsundar/brew,gregory-nisbet/brew,ilovezfs/brew,reitermarkus/brew,AnastasiaSulyagina/brew,AnastasiaSulyagina/brew,EricFromCanada/brew,tonyg/homebrew,reelsense/brew,zmwangx/brew,reitermarkus/brew,alyssais/brew,toonetown/homebrew,claui/brew,konqui/brew,palxex/brew,nandub/brew,sjackman/homebrew,AnastasiaSulyagina/brew,JCount/brew,gregory-nisbet/brew,reitermarkus/brew,pseudocody/brew,vitorgalvao/brew,konqui/brew,claui/brew,mahori/brew,JCount/brew,jmsundar/brew,Homebrew/brew,bfontaine/brew,sjackman/homebrew,hanxue/linuxbrew,tonyg/homebrew,amar-laksh/brew_sudo,JCount/brew,Linuxbrew/brew,gordonmcshane/homebrew,pseudocody/brew,alyssais/brew,bfontaine/brew,aw1621107/brew,claui/brew,ilovezfs/brew,maxim-belkin/brew,DomT4/brew,hanxue/linuxbrew,MikeMcQuaid/brew,DomT4/brew,jmsundar/brew,mahori/brew,nandub/brew,maxim-belkin/brew,mistydemeo/homebrew,vitorgalvao/brew,konqui/brew,mgrimes/brew,gregory-nisbet/brew,gordonmcshane/homebrew,pseudocody/brew,mgrimes/brew,Linuxbrew/brew,palxex/brew,vitorgalvao/brew,gordonmcshane/homebrew,mistydemeo/homebrew,toonetown/homebrew,palxex/brew,mistydemeo/homebrew,muellermartin/dist,mahori/brew,staticfloat/brew,rwhogg/brew,alyssais/brew,MikeMcQuaid/brew,MikeMcQuaid/brew,Linuxbrew/brew,toonetown/homebrew,EricFromCanada/brew,DomT4/brew,JCount/brew