formula_installer: fix build/test reqs not being pruned correctly
formula_installer: fix build/test reqs not being pruned correctly

Fixes #7618.

mahori/brew,Homebrew/brew,vitorgalvao/brew,EricFromCanada/brew,claui/brew,claui/brew,nandub/brew,MikeMcQuaid/brew,MikeMcQuaid/brew,konqui/brew,sjackman/homebrew,nandub/brew,vitorgalvao/brew,sjackman/homebrew,reitermarkus/brew,mahori/brew,reitermarkus/brew,Homebrew/brew,EricFromCanada/brew,sjackman/homebrew,reitermarkus/brew,JCount/brew,mahori/brew,MikeMcQuaid/brew,EricFromCanada/brew,mahori/brew,JCount/brew,konqui/brew,vitorgalvao/brew,claui/brew,vitorgalvao/brew,nandub/brew,reitermarkus/brew,konqui/brew,MikeMcQuaid/brew,Homebrew/brew,konqui/brew,JCount/brew,sjackman/homebrew,claui/brew,EricFromCanada/brew,Homebrew/brew,nandub/brew,JCount/brew