Re: So confusing.
A bad contract will almost certainly doom you. A good contract won't provide you with a get-out-of-jail-free card if the reality of your working situation differs significantly from what is in the contract.
The three main tests are (for self-employment):
Direction & Control [you don't want to be under much]
Mutuality of Obligation [you don't want to have any]
The right to send a Substitute [you want to have one]
HMRC are typically ignoring the 2nd and 3rd tests; while not knowing the details of this case - the courts would appear not to be.
A good starting point for more info on IR35 and how HMRC are trying to apply it is here: