list_next returns L_NO_NEXT_ELEMENT when at end of list