HTreeMapTest: Fix race condition