Add maximum depth of serialization recursion