Tree locking on modification. Prevent empty keys in ``__setitem__``.