properly account for other package directories when building AD plugin