If any axis of the scale of an object was zero, the transformations would
not longer work. This was because td->smtx was set to a zero matrix.
The fix makes sure that td->smtx is never a zero matrix
(by setting it to the unit matrix if it is zero).