AWS's own scene reader finds 46 files or 1, depending where you run it
# same shot, same code, library present: blend_paths(absolute=True) -> 46 libraries -> ['//../../../../lib/sets/monastery/monastery.blend'] images -> 45, of which linked: 45 # library absent: blend_paths(absolute=True) -> 1
A shot that links a set library names exactly one thing: the library. The 45 textures are inside it, and Blender can only report them once it has opened it. AWS’s Blender submitter asks Blender a single question — bpy.utils.blend_paths() — and there is no second pass anywhere in their repo.
That is not a bug in their code. Their submitter is an addon: it runs inside the artist’s own Blender, where every linked library is already open, so the recursion is Blender’s and one call returns the whole tree. From where they stand the problem does not exist.
It exists for anyone reading the scene anywhere else. Run their code on a render worker holding a copy of the scene and nothing else, and it truthfully reports one dependency — and a scan that stops there has just described a shot as needing one file.