17591117c1
Due to weird and strange JS scoping semantics, if we are in a callback, "i" won't be captured and when the callback is called, we'll have the wrong index, causing addImage to be called instead of updateImage. https://bugzilla.gnome.org/show_bug.cgi?id=695882