I'm not the previous author, but actually, this is specified to work, although I agree it is really gross.

See: http://dev.w3.org/html5/spec-preview/the-img-element.html#dom-img-complete

"Note: The value of complete can thus change while a script is executing."