Replace __eq__ try/except from fab08dd by if/else.