Fix pb-discover segfaults caused by list corruption.