Elon Musk loses legal fight with ex-Twitter employee, memo reveals