Fix use of DBG_CACHE and DBG_LOOKUP