Fix a corner case in wrapper lib finding (reported by Yichao Yu)