Remove use to to_dict that failed when autoreference was removed.