Fixed bug in generation of inversed relations. There were too many.