Fix operator= for derived classes.