Test targets list to check if has REF_LIBRARY, and not depend on cwin->library_tree.