Richard and Damian Taylor. Contract Law Directions (2019 7 ed). BAILII has Alfred McAlpine Construction Limited v. Panatown Limited  UKHL 43. p 349.
Benefits in construction contracts
The House of Lords confirmed in the complex case of Alfred McAlpine v Panatown (2001) that, outside the social/consumer contracts where the contract is made by one party for the benefit of others as a matter of convenience and simplicity, there is no general rule allowing a contracting party to recover a loss on behalf of a third party.
McAlpine contracted with Panatown to construct a building on land owned by UIPL, a company in the same group as Panatown. McAlpine also provided a ‘duty of care deed’ to UIPL directly whereby they agreed to use all reasonable skill, etc. in constructing the building.
The project did not go well and the costs of repairs for the alleged defects plus damages for delay were estimated to be tens of millions of pounds. The decision was made by the group of companies to sue under the main contract between McAlpine and Panatown rather than under the duty of care deed between McAlpine and UIPL. [I boldened.] McAlpine argued that Panatown, as opposed to UIPL who was the owner of the defective building, had suffered no loss. Panatown argued in the House of Lords: (i) that it was entitled to recover the loss suffered by UIPL on its behalf; and (ii) that in any event it had suffered a loss itself in that it had not received what it bargained for even if it was itself financially no worse off.
On the first point relating to recovery of loss suffered by a third party, the House of Lords was clear, as has already been said, that there was no general rule permitting such recovery. The real issue here however was whether Panatown could rely on a special rule traceable back to Dunlop v Lambert in 1839 and referred to in The Albazero (1977) by Lord Diplock in relation to contracts for the carriage of goods. This rule was then developed by the House of Lords in Linden Gardens v Lenesta (1994) so as to apply to contracts for the construction of a building.
The Dunlop v Lambert/Albazero exception applies to contracts whereby the claimant is the original consignor of goods to the defendant carrier, it being contemplated that the ownership of the goods will be transferred on by the claimant to subsequent purchasers whilst still being carried by the defendant. The subsequent purchasers are therefore the ones who are, by the time of the breach, the owners who suffer the actual loss or damage to the goods but who have no contract with the defendant carrier. The exception recognizes that the claimant can recover damages even though he suffers no loss personally and that he holds the damages on behalf of the subsequent purchasers who have suffered loss.
This exception was applied by the House of Lords in Linden Gardens v Lenesta (1993), or more accurately in the second case heard and reported with that case, St Martin’s Property Corporation v McAlpine.