python interface: also convert first argument to correct type
If a method is invoked on an object of a class that does not
override the method defined by a superclass, then the method
of the superclass method will be invoked on a reference to a
C object that corresponds to the subclass. This object then
also needs to be explicitly converted to the superclass just
like any other argument of the method.
In particular, the foreach_set method of union_set is not
overriden by set and therefore may get called on an object
that is actually of type set.
Reported-by: Armin Größlinger <armin.groesslinger@uni-passau.de>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>