refactor find_ref_by_name() to accept const list