WIP: TST: Add more MRO tests.
WIP: Changes to MRO algorithm, fix a memory leak.
WIP: Fixed memory leak from TypeError path.