isEmpty() is returning false even when "empty", causing assertion error

OS: OS X 10.9.1 (mavericks)

To reproduce:
Start a single instance of eth:
./eth -m off -u 192.168.1.10 -x 256

Create a peer which connects to this node. This causes the assertion error.
./eth -o peer -l 30301 -u 192.168.1.10 -p 30303 -d /tmp/eth 192.168.1.10

When debugging, the value of _orig.itemCount() is 0 but _orig.isEmpty() returns **false**.

In the commit I'm comparing itemCount() however it maybe more appropriate to just check isNull(). Any recommendations?


Opened blockchain db. Latest: b2579caa489a929ce383cf3ddbfa9515d860382df667195ab0ff64dac88de74c
Address: 127.0.0.1 = 127.0.0.1 [PEER]
Address: 192.168.1.10 = 192.168.1.10 [PEER]
TB : init_upnp()
UPnP device :
 desc: http://192.168.1.155:2869/upnphost/udhisapi.dll?content=uuid:xxxxxxxxx
 st: upnp:rootdevice
external addr: 
TB : upnp_add_redir (30301)
AddPortMapping(30301, 30301, 127.0.0.1) failed with -3. Trying non-specific external port...
AddPortMapping(30301, NULL, 127.0.0.1) failed with -2. Trying non-specific internal port...
AddPortMapping(NULL, 30301, 127.0.0.1) failed with -2. Trying non-specific both ports...
AddPortMapping(NULL, NULL, 127.0.0.1) failed with -2
*** WARNING: Couldn't punch through NAT (or no NAT in place). Using 30301
Listening on local port 30301 (public: 192.168.1.10:30301)
Mode: PeerServer
Attempting connection to 192.168.1.10:30303
Initialising: latest=b2579caa489a929ce383cf3ddbfa9515d860382df667195ab0ff64dac88de74c
Connected to 192.168.1.10:0
Assertion failed: (_orig.isList() && (_orig.itemCount() == 2 || _orig.itemCount() == 17)), function mergeAt, file /libethereum/TrieDB.h, line 462.