It appears that if you search for a book using a library group, and the "unlink books if no longer found by search" option is checked, then links to all libraries not in the group being searched in are removed, rather than ones for just the libraries in the group.