Don't fail on gcd([f]) where f.expand() == 0 (fixes #8384)

```
In [1]: f = x * (y + 42) - x * y - x * 42

In [2]: gcd([f])
Out[2]: 0

In [3]: f.expand()
Out[3]: 0
```
Previously failed with `ComputationFailed(...)`.