Don't compare past the end of the parent key
Only unwatch if we were watching
Fix list traversal and element freeing