Restore model inheritance.

This was broken due to a complicated interaction between several merge commits
and was restored by checking out the state of the files from Hisham Gezeery's
commit df734977d71426bd65fe5c26bb91aceef5594f4e