Minor bug fix to DataStore

An invalidated weak_ptr to transaction will result in a post/put/erase operation to fail silently.