This PR updates all current usages of invariant to CompilerError.invariant along with any available locs