Fixed using BITMAPCACHE_WAITING_LIST_INDEX macro in BmpCache.