In Central Tenders Board v White [2015] UKPC 39 the Privy Council said (at paragraph 26):-
“Ultra vires is not, of course, the only ground on which a court may quash an administrative decision, but it would be wrong for a court to do so in such a way as to nullify a contract made between a public body pursuant to a legal power and a person acting in good faith, except possibly on terms which adequately protect that person’s interest.”