A court has ruled a couple caring for a magpie best known for his friendship with two dogs should no longer have a licence to look after the famous bird.