Avoid unnecessary inversion of a transformation matrix