How to re-link node groups from library without losing their noodles and settings?

For a few projects I’m creating materials whose shader nodes include a few node groups linked from an external .blend library file. Those linked shader nodes are enmeshed in the materials’ node networks, and have many of their fields changed from their defaults to specific values every time they are used.

For organizational purposes I moved the .blend library file to another folder, hoping that the Find Missing Files or the Library Relocate functions would help me re-link the node groups. They do so.

The problem is that, on opening such projects, the initial absence of the linked node groups broke all the noodles leading to and coming from those node groups. After re-establishing the link to the library file, I found out that all the custom values in the node groups’ fields had been reset to their defaults, and the noodles kept on being lost.

Given this, is there any recommended way of dealing with this kind of situation to avoid having to redo these linked node groups’ noodle connections and custom values?

(As I was just testing Blender’s behavior against this case, I have reverted the library to its original directory and corrected the problem, but I’d really like to know what to do about this, because eventually I’ll have to reorganize all the concerned files. Making the node groups local is not a real solution because the groups are constantly evolving)

Edit: I see that I can Relocate to a new library without information loss as long as the original library location exists on opening, but what worries me is meeting a situation where the original directory structure and library file position can’t be reproduced.