Common code factored from PatchingDataStructures/LinkedList into PatchableContainerHelper