fix bug whereby a series of sets and gets can result in a split doubly linked list

also added code to verify that the DLL is consistent at the end of each test