You also need to flip winding when the matrix determinant is negative.
This might be confusing at some times especially when there is an invertnext preceding (causing the flips to cancel each other out)
This might be confusing at some times especially when there is an invertnext preceding (causing the flips to cancel each other out)