The classic builder used the global build platform when probing its image cache. A per-stage FROM --platform could therefore probe with the host architecture and reject cached layers built from a foreign-architecture base image. Read the platform directly from the loaded base image for cache probes. Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>