Extracted a TestIndexTreeNodeMalloc method.