Bugfix: Remove reference in search tree when deleted in storage.

Reference was never removed in search tree on deletion, so the put method returns 0 (line 408 in storage.c) when attempting to put the same reference back into the dictionary.