Fix handling responses with circular references