The British Parliament can change the law as declared by the House of Lords in its judicial capacity, by enacting a statute. The best example was the War Damage Act 1965 which overturned the decision of the House of Lords in its judicial capacity in Burmah Oil Ltd. v. Lord Advocate.
The background is that during WWII in Burma, the British Army destroyed a refinery owned by Burmah Oil Ltd. to keep it from falling into the hands of the advancing Japanese Army. Obviously, an oil refinery is a very important resource during a war, hence the decision to destroy it.
After the war, Burmah Oil sued the British government for the cost of the refinery. Their argument was that while the common law recognised the right of the government to order the destruction of private property to keep it out of the hands of the enemy, that power only applied to destruction in the face of the enemy. On the facts of the case, the Japanese Army was some distance away when the British Army destroyed the refinery, so the exceptional power of the government to destroy private property did not apply.
The House of Lords in its judicial capacity agreed with the oil company’s argument and gave judgment for the company, finding the British government liable for the loss.
The British government passed the War Damage Act in response. Their concern was that the common law doctrine had evolved in a time when warfare was much slower than today. The reason for destroying the refinery even though not in the face of the enemy was valid, and there was no telling how quickly the Japanese army could arrive. As well, throughout the war the British Army had done similar pre-emptive destructions to keep valuable resources out of enemy hands, so if the decision stood, the pay-out to other plaintiffs could be very large.
So, they passed the Act, which is only two sections long. (Can’t find it on-line, sorry.)
The first section of the Act changed the common law rule for war damage and eliminated the “in-the-face-of-the-enemy” requirement, both prospectively and retrospectively. That eliminated all other claims arising out of WWII.
The second section barred Burmah Oil Ltd. from recovering on its judgment from the House of Lords, effectively overturning the decision of Britain’s highest court.