Hi Raffi - We've updated link-library a number of times over the last few months. I've looked back over these changes and they're mostly small and have nothing to do with the way that the category tree is traversed. As a test, I tried rolling the plugin version back to what it was at several moments in the recent past (3 months ago, 12 months ago) to see if the behavior would change. But it did not: in each case, items like 'Static Analysis' were listed both as child categories and as top-level items.
I took a few minutes to look through the plugin to understand what might be happening. The plugin uses WP's `get_terms()` function to fetch a list of categories https://plugins.trac.wordpress.org/browser/link-library/tags/7.4/render-link-library-cats-sc.php?marks=179#L170. `get_terms()` does not return a tree, but a flat array of categories with parent information. It is thus up to the renderer (in this case, link-library) to build a tree. I believe that, in order to work properly, the plugin would need to build the tree before rendering; it's only after walking through the entire array of term objects that you could say whether a given item has a 'parent' and thus should be excluded from level 0 rendering. But the plugin doesn't appear to do this: it just runs through a `foreach` loop of the returned categories, calling itself recursively when the item has children but not excluding it from future rendering when an item appears in a parent's sublist. As such, I don't see evidence that it even tries to exclude children during level-0 rendering.
On a lark, I tried modifying the plugin so that the initial category query fetched only items with parent=0. But something about this seemed to cause the page to trigger out-of-memory errors, so I rolled it back.
I'm afraid we'll have to monitor your post on wordpress.org https://wordpress.org/support/topic/duplicate-flattened-categories-using-link-library-cats/ to see if the author replies.