team: Fix use-after-free when an option instance allocation fails