fix(installer): Fixes the same pkgbase being built multiple times on error
The previous fix commit ec837c8 failed to address the case where the
build fails, as packages are only added to builtPkgDests on a successful
build. This commit addresses this by adding the package to the map earlier.
Fixes #2560.