The official headnote of Tirabi (Deportation: “lawfully resident”: s.5(1))  UKUT 199 (IAC):
For the purposes of applying to para 399A of the Rules and s. 117C of the 2002 Act a definition of “lawfully resident” analogous to that in para 276A (as mandated by SC (Jamaica)), the invalidation provisions of s. 5(1) of the 1971 Act are to be ignored.
The tribunal seems incapable of writing headnotes which might be comprehensible without opening several tabs on a modern browsers (or inserting several thumbs in several books). Given the increasing numbers of unrepresented appellants, particularly in deportation cases, this is a serious issue.
What they mean is that the exception to deportation for foreign criminals sentenced to less than four years’ imprisonment requires the person to show lawful residence in the UK for most of his or her life. This means more than half and can include residence on temporary admission (or now immigration bail). Some deportation cases under the UK Borders Act 2007 now involve early invalidation of a person’s leave but where this occurs that does not count as unlawful residence for this purpose.