Bugfix for loading the same image/thumbnail twice caused loading error.

I'm not sure if this is really a right way to fix this, but at least it fixed the problem. The problem was that if I was trying to load the same thumbnail twice, loading the second time failed.