These days Homebrew refuses to do anything if the xcode-select path is busted, so this workaround is unnecessary.