Return most derived python class instance for polymorphic types. Fixes #6