Matrix inverse caching is now working fine,
with updated tests