Include external dependencies when calculating package hashes for caching