There are many problems with that function, so many that I am considering removing it. Not only does it not work in some unknown situations, its performance can be so bad that calibre slows to a crawl.
Try using one or both of the plugins
[GUI Plugin] Save Virtual Libraries To Column (GUI) or
[Library Closed Plugin] Save Virtual Libraries To Column. These populate a custom column with the VLs for a book, and are much faster and more reliable than the function. The first is run on demand. The second runs whenever you close the library.