[PATCH 5.18 177/181] perf build-id: Fix caching files with a wrong build ID