L1179 is a filter condition. However, the things it can filter will only be returned by L1178; the base list generated in L1177 won't hit the trigger condition. So - L1177-9 shouldn't be reposed as:
```
    potential_clashes = rel_opts.get_all_related_many_to_many_objects()
    potential_clashes += (r for r in rel_opts.get_all_related_objects() if r.field is not field)
```