Calibre is driven by its database, not the folder structure - that's metadata.db file in the library folder.
Adding the books from the old NAS library to a fresh local library with the
Add from directories and subdirectories option and duplicates disallowed is probably the best way.
Jon and I saying the same thing - I think