"This is the final hearing of the care proceedings brought by Thurrock Borough Council in relation to Daniel X, a boy of 10. ... It is also the final hearing of the application by Thurrock Borough Council for me to authorise them to deprive Daniel of his liberty by accommodating him in Y Home. ... The outstanding issue is that of Daniel's liberty, and there is a great deal of consensus on this point too. However, it has been agreed at the bar that it would be helpful if I set out the position in law and how I consider the law applies to Daniel."