Fix race condition when setting the blank image resource

The blank resource may be overwritten by the loader thread if we do not unset the URL before setting the blank resource.