doh...I thought of that and then in the writing reverted to it.

```
u = match[b]
if u.is_Add:
    u = factor_terms(match[b])
if u.is_Mul:
    u = u.as_independent(f(x))[1]
```