Issue #16856: Fix a segmentation fault from calling repr() on a dict with
a key whose repr raise an exception.