Court of Protection overturns capacity ruling