Fix a reference error in `is_instance`.