This was pointed out in https://gerrit.wikimedia.org/r/c/mediawiki/services/parsoid/+/436192/14/lib/ext/Cite/index.js#429
As a fun fallout, mobile apps discovered that the body of the ref-in-ref should be processed before the ref itself,
https://gerrit.wikimedia.org/r/c/mediawiki/services/mobileapps/+/454278/1/test/diff/results/page_references-enwiki-List_of_highest-grossing_Indian_films.json#12
which went in as https://github.com/wikimedia/parsoid/commit/d8cc76c56f150966359d303884c2b25cfde249b5