improve detection of a core library
local search flag should only affect names with package