Fix emitting buildTypes field in downloaded packages. (copy of #406)
Add an early out for invalid child configurations in the dependency resolver. Fixes #405.

Previous behavior could cause exponential run time.