Fix operator= also when no shared d_ptr is used.