Adds caching to inverseFor and implements look for inverses on the other side