Most data-driven turbulence closures are based on the general structure of nonlinear eddy viscosity models. Although this structure can be embedded into the machine learning algorithm and the Reynolds stress tensor itself can be fit as a function of scalar- and tensor-valued inputs, there exists an alternative two-step approach. First, the spatial distributions of the optimal closure coefficients are computed by solving an inverse problem. Subsequently, these are expressed as functions of solely scalar-valued invariants of the flow field by virtue of an arbitrary regression algorithm. In this paper, we present two general inversion strategies that overcome the limitation of being applicable only when all closure tensors are linearly independent. We propose to either cast the inversion into a constrained and regularized optimization problem or project the anisotropy tensor onto a set of previously orthogonalized closure tensors. Using the two-step approach together with either of these strategies then enables us to quantify the model-form error associated with the closure structure independent of a particular regression algorithm. Eventually, this allows for the selection of the a priori optimal set of closure tensors for a given, arbitrary complex test case.