M&S loses appeal in battle over teacake tax