Allow overriding of target class when using clone_obj