list-objects.c: handle unexpected non-tree entries