Iterating backwards over HTMLCollection is O(n^2)