[IMP] models: "X in self" is now equivalent to any(X == rec for rec in self)

Fix modules with code like "record.id in other.stuff_ids".