Fix: References are adapted with same content
This was a regression from If9ab5a98ae49b379c01f57a38f0b08c4e3fad122
which started processing internal templates inside templates. Wrong
use of array.push caused bug T110007
Translate article Factorio from en to fr and publish - All references
must be adapted properly. Content should not be repeated for references.
And for If9ab5a98ae49b379c01f57a38f0b08c4e3fad122, translate
Amblydoras from en to es. Start adding sections from top
to bottom. You will see references section added. Try publishing it.
Publishing will pass. This is normal case. Now translate the same
again and start clicking sections from bottom to top. That means,
you are adding references list first and then section containing reference
later. Try publishing. You will get a parsoid error. With this patch,
adding sections in any order will not result in a publishing error.