More strict criteria to avoid unexpected result when calculating deps diff