Fix remote ADD cache processing

/cc @amuino, you showed me a Dockerfile with a false cache HIT, but can't find it. This PR should solve that issue.