Bug 927877: Check if img is already loaded.

See: https://bugzilla.mozilla.org/show_bug.cgi?id=927877