Fine grained lock for build tracking

[#81247410]