brew-switch: don't link keg-only brews

Closes #18169.