PYTHON-698 - Try encoding types with broken __getattr__ methods