Fix slist/dlist splice when list is empty
Fix construction of hash values and keys lists