Yes, in a word. In Costello v MacDonald,  EWCA Civ 930 [Link available here], Mr. and Mrs. Costello had engaged a firm of builders to develop a property they owned. The Costellos indicated that for tax reasons they would be using a company called Oakwood Residential Ltd, of which they were the sole shareholders and directors. Oakwood was a shell with no assets. The builders helped the Costellos to obtain bank financing, which was channelled through Oakwood for the project. Later, there were disputes about whether the work had been completed and fully paid for. The builders obtained judgment against Oakwood for breach of contract and against the Costellos personally under a restitution claim.
The Costellos appealed the latter. Etherton LJ observed that in one sense the Costellos had clearly been wrongfully enriched at the builders’ expense; they received the benefit of services for which they did not pay (and had been assisted by the claimants in getting the initial funding for the project). On the law, however, the restitution claim against them had to fail; the parties had defined and, more to the point, restricted their obligations to each other, and the court was bound to uphold their allocation of risk. It is sound legal policy to refuse restitutionary relief for unjust enrichment against a defendant who has benefited from services performed by the claimant under a contract to which the defendant was not a party. The builders went into the contract with Oakwood with their eyes open to the possibility of getting stiffed, essentially.