Correct multiple inheritance, CC#1863

Based on pull #134. Fixes [CC#1863](http://issue.cc/r3/1863). Tested in Linux (0.4.4)