Add maxItems to prevent stack overflow when decycle code doesn't work