Mental capacity and deprivation of liberty