Ignore the image ref id when looking for a cache hit

This will allow us to hit the cache more often.

Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>