Improve dependency tracking for targets/ certs