Refactor FindPackages to make FindPackagesPost more versatile