Fix set_object and set_factory overloads