Updated to correctly support nested repeating sections with infinite depth.