Fix error where pretty-printing a frozen cyclic object fatals