Fix potential memory leak by removing entries (double links) properly on invalidateAll()