See https://es.wikipedia.org/api/rest_v1/page/html/Espa%C3%B1a vs https://es.wikipedia.org/wiki/Espa%C3%B1a
The wikitext source has multiple {{Refn|... }} with several <ref> tags in there. It seems that the {{Refn|..}} is generating nested refs and I think Parsoid's cite port is missing some trick here.