Propagate "requiredness" to prerequisites depending on the package's level

We want to specify prerequisites as REQUIRED, but have the build system only honor this if the parent package itself was required. Prerequisites of optional packages should not terminate the build if they are not found. Also various bugfixes which may have caused packages to be evaluated twice earlier.