Another fix for cross-compiled build scripts

Previously the host/target requirement for packages was not correctly calculated
as dependency edges to build dependencies weren't traversed by accident.