Move check for empty maps above lock in receiveMaps.