HMRC came out on top in a legal dispute over tax relief for an investment related to Blackpool Football Club.