I've switched over to list only based implementations. It makes the code slightly more complex, but it now passes all tests, and I've added specific tests for the list based implementations.