Improve dependency tracking with real targets