Optimize multiple inheritance (Merge_Frames)

Based on pull #134. Tested in Linux (0.4.4)