Fix bug where a rehash would sometimes lose an element

Bug was:
* insert 1
* displace 2
* determine we need to rehash table
* try to insert 1 (rather than 2) after insert