Set_type_override & set_type_override_by_type

In reply to L.D.2019:

They do the same thing. Don’t know why they had both. And set_type_override_by_type is not a static method, it probably was factory.set_type_override_by_type() where that needs an extra step to get a handle to the global factory.

Replace is unnecessary here, since both overrides are equivalent.