Fix dependent file target cache check