Merge "Re-order early return when targetPkg is null" into sc-dev