Swig thisown fix for Generators