Fixed errors on cyclic reference when logging

This actually fixes one of our quarantined tests.