Later constraints can break earlier constraints applied to the same coordinates. This can be fixed by computing the orthonormal basis spanned by the constraints. Three types of constraint should be stored - single coordinate, vectors, and functions. The basis spanned by the former two then only needs to be computed once.