Fixed overwriting of tags_cache in imageDao.