We'd only check is_invertible() after calling inverse(), which would do a divide-by-0 for non-invertible matrices. Less ambitious version of #18593.
This is currently missing a lot of functions and initialisation from a <transform-list> string, but is enough for Ruffle.