In order to get the right entry in imgICache::FindEntryProperties() the current document should be provided.
See Bug 1202085 part 4:
Part 4: Add an ID for controlled document to the image cache key
This ID will be null for non-controlled documents and also for image cache
entries for which a document is not available, and it will be the numerical
value of the document pointer for controlled documents.
This effectively makes sure that a controlled document doesn't share its
image cache entries with anything else.